summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/RISCV/rv64c-invalid.s
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/MC/RISCV/rv64c-invalid.s')
-rw-r--r--llvm/test/MC/RISCV/rv64c-invalid.s6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/MC/RISCV/rv64c-invalid.s b/llvm/test/MC/RISCV/rv64c-invalid.s
index 1dcf5e40a8a..e58c113c69f 100644
--- a/llvm/test/MC/RISCV/rv64c-invalid.s
+++ b/llvm/test/MC/RISCV/rv64c-invalid.s
@@ -3,6 +3,8 @@
## GPRC
c.ld ra, 4(sp) # CHECK: :[[@LINE]]:6: error: invalid operand for instruction
c.sd sp, 4(sp) # CHECK: :[[@LINE]]:6: error: invalid operand for instruction
+c.addw a0, a7 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
+c.subw a0, a6 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
## GPRNoX0
c.ldsp x0, 4(sp) # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
@@ -10,6 +12,10 @@ c.ldsp zero, 4(sp) # CHECK: :[[@LINE]]:9: error: invalid operand for instructio
# Out of range immediates
+## simm6
+c.addiw t0, -33 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [-32, 31]
+c.addiw t0, 32 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [-32, 31]
+
## uimm9_lsb000
c.ldsp ra, 512(sp) # CHECK: :[[@LINE]]:13: error: immediate must be a multiple of 8 bytes in the range [0, 504]
c.sdsp ra, -8(sp) # CHECK: :[[@LINE]]:13: error: immediate must be a multiple of 8 bytes in the range [0, 504]
OpenPOWER on IntegriCloud