diff options
author | Alex Bradbury <asb@lowrisc.org> | 2019-03-11 21:35:26 +0000 |
---|---|---|
committer | Alex Bradbury <asb@lowrisc.org> | 2019-03-11 21:35:26 +0000 |
commit | b6d322bdc25e67d538c1d14d3ead9724837f057c (patch) | |
tree | 50715ae0be5eb68a929f11300d5defd275443c86 /llvm/lib | |
parent | 231306bd436e322f571182f56928761db54c3755 (diff) | |
download | bcm5719-llvm-b6d322bdc25e67d538c1d14d3ead9724837f057c.tar.gz bcm5719-llvm-b6d322bdc25e67d538c1d14d3ead9724837f057c.zip |
[RISCV] Allow fp as an alias of s0
The RISC-V Assembly Programmer's Manual defines fp as another alias of x8.
However, our tablegen rules only recognise s0. This patch adds fp as another
alias of x8. GCC also accepts fp.
Differential Revision: https://reviews.llvm.org/D59209
Patch by Ferran Pallarès Roca.
llvm-svn: 355867
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/RISCV/RISCVRegisterInfo.td | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/RISCV/RISCVRegisterInfo.td b/llvm/lib/Target/RISCV/RISCVRegisterInfo.td index 9f6c0908138..79f8ab12f6c 100644 --- a/llvm/lib/Target/RISCV/RISCVRegisterInfo.td +++ b/llvm/lib/Target/RISCV/RISCVRegisterInfo.td @@ -55,7 +55,7 @@ let RegAltNameIndices = [ABIRegAltName] in { def X6 : RISCVReg<6, "x6", ["t1"]>, DwarfRegNum<[6]>; def X7 : RISCVReg<7, "x7", ["t2"]>, DwarfRegNum<[7]>; } - def X8 : RISCVReg<8, "x8", ["s0"]>, DwarfRegNum<[8]>; + def X8 : RISCVReg<8, "x8", ["s0", "fp"]>, DwarfRegNum<[8]>; def X9 : RISCVReg<9, "x9", ["s1"]>, DwarfRegNum<[9]>; def X10 : RISCVReg<10,"x10", ["a0"]>, DwarfRegNum<[10]>; def X11 : RISCVReg<11,"x11", ["a1"]>, DwarfRegNum<[11]>; |