mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-25 05:15:58 +00:00
[RISCV] Define sfence.vma InstAliases to match the GNU RISC-V tools
Unfortunately these aren't defined explicitly in the privileged spec, but the GNU assembler does accept `sfence.vma` and `sfence.vma rs` as well as the usual `sfence.vma rs, rt`. llvm-svn: 320575
This commit is contained in:
parent
c09b09bba3
commit
fdc8e3a838
@ -459,6 +459,9 @@ def : InstAlias<"csrwi $csr, $imm", (CSRRWI X0, uimm12:$csr, uimm5:$imm)>;
|
||||
def : InstAlias<"csrsi $csr, $imm", (CSRRSI X0, uimm12:$csr, uimm5:$imm)>;
|
||||
def : InstAlias<"csrci $csr, $imm", (CSRRCI X0, uimm12:$csr, uimm5:$imm)>;
|
||||
|
||||
def : InstAlias<"sfence.vma", (SFENCE_VMA X0, X0)>;
|
||||
def : InstAlias<"sfence.vma $rs", (SFENCE_VMA GPR:$rs, X0)>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Pseudo-instructions and codegen patterns
|
||||
//
|
||||
|
@ -2,6 +2,6 @@
|
||||
|
||||
mret 0x10 # CHECK: :[[@LINE]]:6: error: invalid operand for instruction
|
||||
|
||||
sfence.vma zero # CHECK: :[[@LINE]]:1: error: too few operands for instruction
|
||||
sfence.vma zero, a1, a2 # CHECK: :[[@LINE]]:22: error: invalid operand for instruction
|
||||
|
||||
sfence.vma a0, 0x10 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
|
||||
|
@ -136,3 +136,10 @@ csrsi 0xfff, 0x10
|
||||
# CHECK-INST: csrrci zero, 320, 17
|
||||
# CHECK-ALIAS: csrci 320, 17
|
||||
csrci 0x140, 0x11
|
||||
|
||||
# CHECK-INST: sfence.vma zero, zero
|
||||
# CHECK-ALIAS: sfence.vma
|
||||
sfence.vma
|
||||
# CHECK-INST: sfence.vma a0, zero
|
||||
# CHECK-ALIAS: sfence.vma a0
|
||||
sfence.vma a0
|
||||
|
Loading…
x
Reference in New Issue
Block a user