[Patch ARM] PR target/19599 Enable sibcalls through function pointers.
Ramana Radhakrishnan
ramana.r@gmail.com
Thu Jun 4 11:44:00 GMT 2009
Hi,
This patch allows sibling calls through function pointers on the ARM
port. Testing currently on a qemu cross to cortex-a8 on arm-none-eabi
cross.
The one case (as Richard pointed out this morning ) not considered
with this patch is that it doesn't consider the corner case of users
trying to use -fcaller-save and -fcallee-save from the command line
but the caller-save callee-save bits of the ABI for this are quite
hard-coded in the ARM backend that one will have to rewrite quite a
few bits in the backend to get those options supported properly.
Ok to commit if no regressions ?
cheers
Ramana
2009-06-02 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/19599
* config/arm/predicates.md (call_insn_operand): New predicate.
* config/arm/constraints.md ("Cs"): New register constraint.
("Ss"): New constraint for symbol references.
* config/arm/arm.md (sibcall): Allow only memory indirects through
symbol refs or register operands for operands[0].
(sibcall_value): Likewise for operands[1].
(*sibcall_insn): Allow register indirect sibcalls.
(*sibcall_value): Allow register indirect sibcalls.
* config/arm/arm.h (enum reg_class): New reg class ARM_CALLER_SAVE_REGS.
(REG_CLASS_NAMES): Likewise.
(REG_CLASS_CONTENTS): Likewise.
* config/arm/arm.c (arm_function_ok_for_sibcall): Remove check for
functions without decls. Handle fallout of NULL decls.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr19599.patch
Type: text/x-patch
Size: 6930 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090604/6f7cebed/attachment.bin>
More information about the Gcc-patches
mailing list