[PATCH] D127721: [RISCV][NFC] Add load/store instructions in rv64*-invalid.s

Pretty-box via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 00:18:05 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Pretty-box marked an inline comment as done.
Closed by commit rG880ac5189d63: [RISCV][NFC] Add load/store instructions in rv64*-invalid.s (authored by Pretty-box).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127721

Files:
  llvm/test/MC/RISCV/rv64zdinx-invalid.s
  llvm/test/MC/RISCV/rv64zfh-invalid.s
  llvm/test/MC/RISCV/rv64zfinx-invalid.s
  llvm/test/MC/RISCV/rv64zhinx-invalid.s
  llvm/test/MC/RISCV/rv64zhinxmin-invalid.s


Index: llvm/test/MC/RISCV/rv64zhinxmin-invalid.s
===================================================================
--- llvm/test/MC/RISCV/rv64zhinxmin-invalid.s
+++ llvm/test/MC/RISCV/rv64zhinxmin-invalid.s
@@ -1,6 +1,10 @@
-# RUN: not llvm-mc -triple riscv64 -mattr=+zhinx %s 2>&1 | FileCheck %s
+# RUN: not llvm-mc -triple riscv64 -mattr=+zhinxmin %s 2>&1 | FileCheck %s
+
+# Not support float registers
+flh fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point) or 'Zfhmin' (Half-Precision Floating-Point Minimal)
 
 # Invalid instructions
+fsh a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
 fmv.x.h t2, a2 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
 fmv.h.x a5, t5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
 
Index: llvm/test/MC/RISCV/rv64zhinx-invalid.s
===================================================================
--- llvm/test/MC/RISCV/rv64zhinx-invalid.s
+++ llvm/test/MC/RISCV/rv64zhinx-invalid.s
@@ -1,6 +1,10 @@
 # RUN: not llvm-mc -triple riscv64 -mattr=+zhinx %s 2>&1 | FileCheck %s
 
+# Not support float registers
+flh fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point) or 'Zfhmin' (Half-Precision Floating-Point Minimal)
+
 # Invalid instructions
+fsh a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
 fmv.x.h t2, a2 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
 fmv.h.x a5, t5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
 
Index: llvm/test/MC/RISCV/rv64zfinx-invalid.s
===================================================================
--- llvm/test/MC/RISCV/rv64zfinx-invalid.s
+++ llvm/test/MC/RISCV/rv64zfinx-invalid.s
@@ -1,6 +1,10 @@
 # RUN: not llvm-mc -triple riscv64 -mattr=+zfinx %s 2>&1 | FileCheck %s
 
+# Not support float registers
+flw fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'F' (Single-Precision Floating-Point)
+
 # Invalid instructions
+fsw a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
 fmv.x.w t2, a2 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
 fmv.w.x a5, t5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
 
Index: llvm/test/MC/RISCV/rv64zfh-invalid.s
===================================================================
--- llvm/test/MC/RISCV/rv64zfh-invalid.s
+++ llvm/test/MC/RISCV/rv64zfh-invalid.s
@@ -1,6 +1,17 @@
 # RUN: not llvm-mc -triple riscv64 -mattr=+zfh < %s 2>&1 | \
 # RUN:   FileCheck %s
 
+# Out of range immediates
+## simm12
+flh ft1, -2049(a0) # CHECK: :[[@LINE]]:10: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
+fsh ft2, 2048(a1) # CHECK: :[[@LINE]]:10: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
+
+# Memory operand not formatted correctly
+flw ft1, a0, -200 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
+fsw ft2, a1, 100 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
+fld ft1, a0, -200 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
+fsd ft2, a1, 100 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
+
 # Integer registers where FP regs are expected
 fcvt.l.h ft0, a0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
 fcvt.lu.h ft1, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
Index: llvm/test/MC/RISCV/rv64zdinx-invalid.s
===================================================================
--- llvm/test/MC/RISCV/rv64zdinx-invalid.s
+++ llvm/test/MC/RISCV/rv64zdinx-invalid.s
@@ -1,6 +1,12 @@
 # RUN: not llvm-mc -triple riscv64 -mattr=+zdinx %s 2>&1 | FileCheck %s
 
-# Invalid Instructions
+# Not support float registers
+fld fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'D' (Double-Precision Floating-Point)
+ld a0, -2049(a1) # CHECK: :[[@LINE]]:8: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
+
+# Invalid instructions
+fsd a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
+sd fa4, 64(sp) # CHECK: :[[@LINE]]:4: error: invalid operand for instruction
 fmv.x.d t2, a2 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
 fmv.d.x a5, t5 # CHECK: :[[@LINE]]:9:  error: invalid operand for instruction
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127721.437808.patch
Type: text/x-patch
Size: 4500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220617/040fbf10/attachment.bin>


More information about the llvm-commits mailing list