Fix PR target/10567
Eric Botcazou
ebotcazou@libertysurf.fr
Thu Jul 8 02:28:00 GMT 2004
The SPARC back-end doesn't honor the -f{no-}delayed-branch flag. The fix
should have been minimal after the recent cleanup work, but it turned out it
is not because of the C++ thunk support that requires a sibcall, which is
not trivial to generate without using delay slots on SPARC.
David is of the opinion the patch should go in anyway, so I commited this
revised version to mainline. Bootstrapped/regtested (C, C++, ObjC) on
sparc64-sun-solaris2.9 and sparc-sun-solaris2.8, with and without:
BOOT_CFLAGS="-g -O2 -fno-delayed-branch" CXXFLAGS="-g -O2
-fno-delayed-branch"
[It appears that LIBCXXFLAGS doesn't have any affect on the flags used for
building libstdc++-v3 on mainline].
2004-07-07 Eric Botcazou <ebotcazou@libertysurf.fr>
PR target/10567
* config/sparc/sparc.c (load_pic_register): Honor flag_delayed_branch.
(output_return): Likewise.
(output_sibcall): Abort if !flag_delayed_branch.
(sparc_function_ok_for_sibcall): Return 0 if !flag_delayed_branch.
(emit_and_preserve): New function.
(sparc_output_mi_thunk): Use it. Honor flag_delayed_branch. Emit an
indirect jump to the thunked-to function if !flag_delayed_branch.
* config/sparc/sparc.md (delayed_branch): New attribute.
(load_pcrel_sym): Honor flag_delayed_branch. Use above
attribute to compute the length of the insn.
(goto_handler_and_restore): Likewise.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparc_no_delayed_branch.diff
Type: text/x-diff
Size: 10453 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040708/e30c46d4/attachment.bin>
More information about the Gcc-patches
mailing list