[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)
Jim Lin via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 21 10:18:36 PDT 2025
================
@@ -0,0 +1,56 @@
+# XAndesPerf - Andes Performance Extension
+# RUN: not llvm-mc -triple riscv32 -mattr=+xandesperf < %s 2>&1 \
+# RUN: | FileCheck %s
+# RUN: not llvm-mc -triple riscv64 -mattr=+xandesperf < %s 2>&1 \
+# RUN: | FileCheck %s -check-prefix=CHECK-64
+
+# Out of range immediates
+## uimm5
+nds.bbc t0, 33, 256 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 31]
+nds.bbs t1, 33, 256 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 31]
+nds.bbc t0, 64, 256 # CHECK-64: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 63]
+nds.bbs t1, 64, 256 # CHECK-64: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 63]
+
+## uimm7
+nds.beqc t0, 1024, 13 # CHECK, CHECK-64: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 127]
----------------
tclin914 wrote:
Thanks for catching this. Move the invalid operand mc test for RV64 only to xandesperf-rv64-invalid.s.
https://github.com/llvm/llvm-project/pull/135110
More information about the llvm-commits
mailing list