[PATCH] D89288: [RISCV] Enable the use of the old sptbr name
ShihPo Hung via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 20:18:33 PDT 2020
arcbbb updated this revision to Diff 297750.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89288/new/
https://reviews.llvm.org/D89288
Files:
llvm/lib/Target/RISCV/RISCVSystemOperands.td
llvm/test/MC/RISCV/supervisor-csr-names.s
Index: llvm/test/MC/RISCV/supervisor-csr-names.s
===================================================================
--- llvm/test/MC/RISCV/supervisor-csr-names.s
+++ llvm/test/MC/RISCV/supervisor-csr-names.s
@@ -191,3 +191,17 @@
csrrs t1, satp, zero
# uimm12
csrrs t2, 0x180, zero
+
+# sptbr
+# name
+# CHECK-INST: csrrs t1, satp, zero
+# CHECK-ENC: encoding: [0x73,0x23,0x00,0x18]
+# CHECK-INST-ALIAS: csrr t1, satp
+# uimm12
+# CHECK-INST: csrrs t2, satp, zero
+# CHECK-ENC: encoding: [0xf3,0x23,0x00,0x18]
+# CHECK-INST-ALIAS: csrr t2, satp
+# name
+csrrs t1, sptbr, zero
+# uimm12
+csrrs t2, 0x180, zero
Index: llvm/lib/Target/RISCV/RISCVSystemOperands.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVSystemOperands.td
+++ llvm/lib/Target/RISCV/RISCVSystemOperands.td
@@ -175,6 +175,7 @@
//===-------------------------------------
// Supervisor Protection and Translation
//===-------------------------------------
+let AltName = "sptbr" in // Privileged spec v1.9.1 Name
def : SysReg<"satp", 0x180>;
//===-----------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89288.297750.patch
Type: text/x-patch
Size: 1105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201013/586751e4/attachment.bin>
More information about the llvm-commits
mailing list