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

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 18:42:55 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc15ae0a37dda: [RISCV][NFC] Add RV64Zbs invalid tests (authored by Pretty-box, committed by benshi001).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124428/new/

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.425389.patch
Type: text/x-patch
Size: 1959 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220427/975960c0/attachment.bin>


More information about the llvm-commits mailing list