diff options
author | Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp> | 2022-08-18 19:03:51 +0900 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2022-08-18 12:59:46 -0700 |
commit | 8731aa98674eda56425ffd652918ce4979631f67 (patch) | |
tree | 74d4511009454b412ebef7537aaf7bff327b4bbb /contrib | |
parent | ca170ed9f8a086ca7e1eec841882b6bed9ec1a3a (diff) | |
download | gcc-8731aa98674eda56425ffd652918ce4979631f67.zip gcc-8731aa98674eda56425ffd652918ce4979631f67.tar.gz gcc-8731aa98674eda56425ffd652918ce4979631f67.tar.bz2 |
xtensa: Improve indirect sibling call handling
No longer needs the dedicated hard register (A11) for the address of the
call and the split patterns for fixups, due to the introduction of appropriate
register class and constraint.
(Note: "ISC_REGS" contains a hard register A8 used as a "static chain"
pointer for nested functions, but no problem; Pointer to nested function
actually points to "trampoline", and trampoline itself doesn't receive
"static chain" pointer to its parent's stack frame from the caller.)
gcc/ChangeLog:
* config/xtensa/xtensa.h
(enum reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS):
Add new register class "ISC_REGS".
* config/xtensa/constraints.md (c): Add new register constraint.
* config/xtensa/xtensa.md (define_constants): Remove "A11_REG".
(sibcall_internal, sibcall_value_internal):
Change to use the new register constraint, and remove two split
patterns for fixups that are no longer needed.
gcc/testsuite/ChangeLog:
* gcc.target/xtensa/sibcalls.c: Add a new test function to ensure
that registers for arguments (occupy from A2 to A7) and for indirect
sibcall (should be assigned to A8) neither conflict nor spill out.
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions