On Thu, Aug 18, 2022 at 3:06 AM Takayuki 'January June' Suwa
<jjsuwa_sys3...@yahoo.co.jp> wrote:
>
> 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.
> ---
>  gcc/config/xtensa/constraints.md           |  5 ++++
>  gcc/config/xtensa/xtensa.h                 |  3 +++
>  gcc/config/xtensa/xtensa.md                | 29 ++--------------------
>  gcc/testsuite/gcc.target/xtensa/sibcalls.c |  5 ++++
>  4 files changed, 15 insertions(+), 27 deletions(-)

Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.

-- 
Thanks.
-- Max

Reply via email to