]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/config/loongarch/loongarch.h
loongarch: exclude LARCH_PROLOGUE_TEMP from SIBCALL_REGS [PR 106096]
authorXi Ruoyao <xry111@xry111.site>
Tue, 28 Jun 2022 08:00:14 +0000 (16:00 +0800)
committerXi Ruoyao <xry111@xry111.site>
Tue, 28 Jun 2022 11:03:04 +0000 (19:03 +0800)
commit020b7d98589bbc928b5a66b1ed56b42af8791355
tree68e2389af1a27091e7b436947617d176af30f49a
parent88417d77fec57c9d15ac2864b37e84eee575a781
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.
gcc/config/loongarch/loongarch.cc
gcc/config/loongarch/loongarch.h
gcc/testsuite/g++.target/loongarch/loongarch.exp [new file with mode: 0644]
gcc/testsuite/g++.target/loongarch/pr106096.C [new file with mode: 0644]