]> git.ipfire.org Git - thirdparty/gcc.git/commit
xtensa: Small changes to 'return' insn pattern
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Mon, 5 Jan 2026 18:59:35 +0000 (03:59 +0900)
committerMax Filippov <jcmvbkbc@gmail.com>
Tue, 6 Jan 2026 18:31:39 +0000 (10:31 -0800)
commit384c6aef8b5d0378444ea23ea4b85556ed524986
tree0545a811b9757b21496190afc2edf7f880a0988a
parent8b8d234304abab6ae93faf92c0151fe5d290ca64
xtensa: Small changes to 'return' insn pattern

This pattern is only emitted during function epilogue expansion (obviously
after register allocation), so putting reload_completed in the condition
is redundant.

This patch also changes the declaration of the return register (A0 address
register) required for normal function returns to properly defining the
EPILOGUE_USES macro, as is already done on other targets, rather than
placing '(use (reg:SI A0_REG))' RTX.

gcc/ChangeLog:

* config/xtensa/xtensa.h (EPILOGUE_USES): New macro definition.
* config/xtensa/xtensa.md (return):
Remove '(use (reg:SI A0_REG))' from the template description, and
reload_completed from the condition.
(sibcall_epilogue): Remove emitting '(use (reg:SI A0_REG))'.
gcc/config/xtensa/xtensa.h
gcc/config/xtensa/xtensa.md