On Fri, Jul 19, 2024 at 1:35 PM Takayuki 'January June' Suwa
<jjsuwa_sys3...@yahoo.co.jp> wrote:
>
> It is not wrong but also not optimal to specify that sibcalls require
> register A0 in RTX generation pass, by misleading DFA into thinking it
> is being used in function body.
> It would be better to specify it in pro_and_epilogue as with 'return'
> insn in order to avoid incorrect removing load that restores A0 in
> subsequent passes, but since it is not possible to modify each sibcall
> there, as a workaround we will preface it with a 'use' as before.
>
> This patch effectively reverts commit 
> abe81aa19f250516fd57f76cad9c0920cce221bc.
>
> gcc/ChangeLog:
>
>         * config/xtensa/xtensa-protos.h (xtensa_expand_call):
>         Remove the third argument.
>         * config/xtensa/xtensa.cc (xtensa_expand_call):
>         Remove the third argument and the code that uses it.
>         * config/xtensa/xtensa.md (call, call_value, sibcall, sibcall_value):
>         Remove each Boolean constant specified in the third argument of
>         xtensa_expand_call.
>         (sibcall_epilogue): Add emitting '(use A0_REG)' after calling
>         xtensa_expand_epilogue.
> ---
>   gcc/config/xtensa/xtensa-protos.h |  2 +-
>   gcc/config/xtensa/xtensa.cc       | 10 +---------
>   gcc/config/xtensa/xtensa.md       |  9 +++++----
>   3 files changed, 7 insertions(+), 14 deletions(-)

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

-- 
Thanks.
-- Max

Reply via email to