diff options
author | YunQiang Su <syq@gcc.gnu.org> | 2024-05-29 02:28:25 +0800 |
---|---|---|
committer | YunQiang Su <syq@debian.org> | 2024-05-30 01:15:41 +0800 |
commit | 915440eed21de367cb41857afb5273aff5bcb737 (patch) | |
tree | eb5411659827dddbace4799ae19140e9838b1be0 /gcc/config.build | |
parent | 9a92e5e56a7f2b19928b8cb7634f59d9c7b2b582 (diff) | |
download | gcc-915440eed21de367cb41857afb5273aff5bcb737.zip gcc-915440eed21de367cb41857afb5273aff5bcb737.tar.gz gcc-915440eed21de367cb41857afb5273aff5bcb737.tar.bz2 |
MIPS16: Mark $2/$3 as clobbered if GP is used
PR Target/84790.
The gp init sequence
li $2,%hi(_gp_disp)
addiu $3,$pc,%lo(_gp_disp)
sll $2,16
addu $2,$3
is generated directly in `mips_output_function_prologue`, and does
not appear in the RTL.
So the IRA/IPA passes are not aware that $2/$3 have been clobbered,
so they may be used for cross (local) function call.
Let's mark $2/$3 clobber both:
- Just after the UNSPEC_GP RTL of a function;
- Just after a function call.
Reported-by: Matthias Schiffer <mschiffer@universe-factory.net>
Origin-Patch-by: Felix Fietkau <nbd@nbd.name>.
gcc
* config/mips/mips.cc(mips16_gp_pseudo_reg): Mark
MIPS16_PIC_TEMP and MIPS_PROLOGUE_TEMP clobbered.
(mips_emit_call_insn): Mark MIPS16_PIC_TEMP and
MIPS_PROLOGUE_TEMP clobbered if MIPS16 and CALL_CLOBBERED_GP.
Diffstat (limited to 'gcc/config.build')
0 files changed, 0 insertions, 0 deletions