[PATCH] D124428: [RISCV] Add RV64Zbs invalid tests

Pretty-box via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 19:07:00 PDT 2022


Pretty-box created this revision.
Pretty-box added reviewers: benshi001, craig.topper, frasercrmck.
Pretty-box added projects: All, LLVM.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, arichardson.
Pretty-box requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124428

Files:
  llvm/test/MC/RISCV/rv64zbs-invalid.s


Index: llvm/test/MC/RISCV/rv64zbs-invalid.s
===================================================================
--- /dev/null
+++ llvm/test/MC/RISCV/rv64zbs-invalid.s
@@ -0,0 +1,30 @@
+# RUN: not llvm-mc -triple riscv64 -mattr=+zbs < %s 2>&1 | FileCheck %s
+
+# Too few operands
+bclr t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+# Too few operands
+bset t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+# Too few operands
+binv t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+# Too few operands
+bext t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+# Too few operands
+bclri t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+# Immediate operand out of range
+bclri t0, t1, 64 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
+bclri t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
+# Too few operands
+bseti t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+# Immediate operand out of range
+bseti t0, t1, 64 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
+bseti t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
+# Too few operands
+binvi t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+# Immediate operand out of range
+binvi t0, t1, 64 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
+binvi t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
+# Too few operands
+bexti t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+# Immediate operand out of range
+bexti t0, t1, 64 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
+bexti t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124428.425103.patch
Type: text/x-patch
Size: 1959 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220426/aa542ee1/attachment.bin>


More information about the llvm-commits mailing list