[llvm] 210b586 - [RISCV] Add vcsr CSR name for V extension.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 25 08:56:29 PDT 2021
Author: Craig Topper
Date: 2021-10-25T08:56:25-07:00
New Revision: 210b586a85beacf0d8341a320eb68814e8b5477f
URL: https://github.com/llvm/llvm-project/commit/210b586a85beacf0d8341a320eb68814e8b5477f
DIFF: https://github.com/llvm/llvm-project/commit/210b586a85beacf0d8341a320eb68814e8b5477f.diff
LOG: [RISCV] Add vcsr CSR name for V extension.
Reviewed By: frasercrmck, kito-cheng
Differential Revision: https://reviews.llvm.org/D112342
Added:
Modified:
llvm/lib/Target/RISCV/RISCVSystemOperands.td
llvm/test/MC/RISCV/rvv-user-csr-names.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVSystemOperands.td b/llvm/lib/Target/RISCV/RISCVSystemOperands.td
index a561772b650b..41599dd8bb3f 100644
--- a/llvm/lib/Target/RISCV/RISCVSystemOperands.td
+++ b/llvm/lib/Target/RISCV/RISCVSystemOperands.td
@@ -385,6 +385,7 @@ def : SysReg<"dscratch1", 0x7B3>;
def : SysReg<"vstart", 0x008>;
def : SysReg<"vxsat", 0x009>;
def : SysReg<"vxrm", 0x00A>;
+def : SysReg<"vcsr", 0x00F>;
def : SysReg<"vl", 0xC20>;
def : SysReg<"vtype", 0xC21>;
def : SysReg<"vlenb", 0xC22>;
diff --git a/llvm/test/MC/RISCV/rvv-user-csr-names.s b/llvm/test/MC/RISCV/rvv-user-csr-names.s
index 35651c540ec6..71d40334f6e0 100644
--- a/llvm/test/MC/RISCV/rvv-user-csr-names.s
+++ b/llvm/test/MC/RISCV/rvv-user-csr-names.s
@@ -56,6 +56,20 @@ csrrs t1, vxrm, zero
# uimm12
csrrs t2, 0x00a, zero
+# vcsr
+# name
+# CHECK-INST: csrrs t1, vcsr, zero
+# CHECK-ENC: encoding: [0x73,0x23,0xf0,0x00]
+# CHECK-INST-ALIAS: csrr t1, vcsr
+# uimm12
+# CHECK-INST: csrrs t2, vcsr, zero
+# CHECK-ENC: encoding: [0xf3,0x23,0xf0,0x00]
+# CHECK-INST-ALIAS: csrr t2, vcsr
+# name
+csrrs t1, vcsr, zero
+# uimm12
+csrrs t2, 0x00f, zero
+
# vl
# name
# CHECK-INST: csrrs t1, vl, zero
More information about the llvm-commits
mailing list