]> git.ipfire.org Git - thirdparty/gcc.git/commit
xtensa: Remove TARGET_PROMOTE_PROTOTYPES
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 30 Jun 2025 20:46:31 +0000 (04:46 +0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 7 Jul 2025 18:24:36 +0000 (11:24 -0700)
commit2a6ac385076a0d43a529e84e7f7ebcbfc3831437
tree6f28f890e2e4d934aaee783d88f0757bcb09b83c
parentc476f554e3f52086181d5c85701db34f6f390e3c
xtensa: Remove TARGET_PROMOTE_PROTOTYPES

xtensa ABI requires sign extension of signed 8/16-bit arguments to 32
bits and zero extension of unsigned 8/16-bit arguments to 32 bits.
TARGET_PROMOTE_PROTOTYPES is an optimization, not an ABI requirement.
Remove TARGET_PROMOTE_PROTOTYPES and define xtensa_promote_function_mode
to properly extend 8/16-bit arguments to 32 bits.

gcc/

PR target/120888
* config/xtensa/xtensa.cc (xtensa_promote_function_mode): New.
(TARGET_PROMOTE_FUNCTION_MODE): Use.
(TARGET_PROMOTE_PROTOTYPES): Removed.

gcc/testsuite/

PR target/120888
* gcc.target/xtensa/pr120888-1.c: New test.
* gcc.target/xtensa/pr120888-2.c: Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
gcc/config/xtensa/xtensa.cc
gcc/testsuite/gcc.target/xtensa/pr120888-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xtensa/pr120888-2.c [new file with mode: 0644]