diff options
author | Xi Ruoyao <xry111@xry111.site> | 2022-06-28 16:00:14 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2022-06-28 19:03:04 +0800 |
commit | 020b7d98589bbc928b5a66b1ed56b42af8791355 (patch) | |
tree | 68e2389af1a27091e7b436947617d176af30f49a /gcc/config/loongarch | |
parent | 88417d77fec57c9d15ac2864b37e84eee575a781 (diff) | |
download | gcc-020b7d98589bbc928b5a66b1ed56b42af8791355.zip gcc-020b7d98589bbc928b5a66b1ed56b42af8791355.tar.gz gcc-020b7d98589bbc928b5a66b1ed56b42af8791355.tar.bz2 |
loongarch: exclude LARCH_PROLOGUE_TEMP from SIBCALL_REGS [PR 106096]
The epilogue may clobber LARCH_PROLOGUE_TEMP ($r13/$t1), so it cannot be
used for sibcalls.
gcc/ChangeLog:
PR target/106096
* config/loongarch/loongarch.h (REG_CLASS_CONTENTS): Exclude
$r13 from SIBCALL_REGS.
* config/loongarch/loongarch.cc (loongarch_regno_to_class):
Change $r13 to JIRL_REGS.
gcc/testsuite/ChangeLog:
PR target/106096
* g++.target/loongarch/loongarch.exp: New test support file.
* g++.target/loongarch/pr106096.C: New test.
Diffstat (limited to 'gcc/config/loongarch')
-rw-r--r-- | gcc/config/loongarch/loongarch.cc | 2 | ||||
-rw-r--r-- | gcc/config/loongarch/loongarch.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc index 80046b6..c8502b0 100644 --- a/gcc/config/loongarch/loongarch.cc +++ b/gcc/config/loongarch/loongarch.cc @@ -189,7 +189,7 @@ const enum reg_class loongarch_regno_to_class[FIRST_PSEUDO_REGISTER] = { GR_REGS, GR_REGS, GR_REGS, GR_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, - SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, + SIBCALL_REGS, JIRL_REGS, SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, GR_REGS, GR_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loongarch.h index 4d107a4..f9de9a6 100644 --- a/gcc/config/loongarch/loongarch.h +++ b/gcc/config/loongarch/loongarch.h @@ -511,7 +511,7 @@ enum reg_class #define REG_CLASS_CONTENTS \ { \ { 0x00000000, 0x00000000, 0x00000000 }, /* NO_REGS */ \ - { 0x001ff000, 0x00000000, 0x00000000 }, /* SIBCALL_REGS */ \ + { 0x001fd000, 0x00000000, 0x00000000 }, /* SIBCALL_REGS */ \ { 0xff9ffff0, 0x00000000, 0x00000000 }, /* JIRL_REGS */ \ { 0xfffffffc, 0x00000000, 0x00000000 }, /* CSR_REGS */ \ { 0xffffffff, 0x00000000, 0x00000000 }, /* GR_REGS */ \ |