[PATCH][AARCH64] Support tail indirect function call
Jiong Wang
jiong.wang@arm.com
Tue Mar 18 14:22:00 GMT 2014
Current, indirect function call prevents tail-call optimization on AArch64.
This patch adapt the fix for PR arm/19599 to AArch64.
Is it ok for next stage 1?
Thanks.
-- Jiong
gcc/
* config/aarch64/predicates.md (aarch64_call_insn_operand): New
predicate.
* config/aarch64/constraints.md ("Ucs", "Usf"): New constraints.
* config/aarch64/aarch64.md (*sibcall_insn, *sibcall_value_insn):
Adjust for
tailcalling through registers.
* config/aarch64/aarch64.h (enum reg_class): New caller save
register class.
(REG_CLASS_NAMES): Likewise.
(REG_CLASS_CONTENTS): Likewise.
* config/aarch64/aarch64.c (aarch64_function_ok_for_sibcall): Allow
tailcalling
without decls.
gcc/testsuite
*gcc.target/aarch64/tail-indirect-call.c: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tail-indirect-func-call.patch
Type: text/x-patch
Size: 5178 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140318/4c92c9c7/attachment.bin>
More information about the Gcc-patches
mailing list