================
@@ -1,408 +1,825 @@
-// RUN: llvm-mc -triple aarch64 -mattr=+lsui -show-encoding %s  | FileCheck %s
-// RUN: not llvm-mc -triple aarch64 -show-encoding %s 2>&1  | FileCheck %s 
--check-prefix=ERROR
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsui < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsui < %s \
+// RUN:        | llvm-objdump -d --mattr=+lsui --no-print-imm-hex - | 
FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsui < %s \
+// RUN:        | llvm-objdump -d --mattr=-lsui --no-print-imm-hex - | 
FileCheck %s --check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsui < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -mattr=+lsui -disassemble 
-show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+
+
 
-_func:
-// CHECK: _func:
 
//------------------------------------------------------------------------------
 // Unprivileged load/store operations
 
//------------------------------------------------------------------------------
-  ldtxr       x9, [sp]
-// CHECK: ldtxr        x9, [sp]                        // encoding: 
[0xe9,0x7f,0x5f,0xc9]
-// ERROR: error: instruction requires: lsui
-  ldtxr       x9, [sp, #0]
-// CHECK: ldtxr        x9, [sp]                        // encoding: 
[0xe9,0x7f,0x5f,0xc9]
-// ERROR: error: instruction requires: lsui
-  ldtxr       x10, [x11]
-// CHECK: ldtxr        x10, [x11]                      // encoding: 
[0x6a,0x7d,0x5f,0xc9]
-// ERROR: error: instruction requires: lsui
-  ldtxr       x10, [x11, #0]
-// CHECK: ldtxr        x10, [x11]                      // encoding: 
[0x6a,0x7d,0x5f,0xc9]
-// ERROR: error: instruction requires: lsui
-
-  ldatxr      x9, [sp]
-// CHECK: ldatxr       x9, [sp]                        // encoding: 
[0xe9,0xff,0x5f,0xc9]
-// ERROR: error: instruction requires: lsui
-  ldatxr      x10, [x11]
-// CHECK: ldatxr       x10, [x11]                      // encoding: 
[0x6a,0xfd,0x5f,0xc9]
-// ERROR: error: instruction requires: lsui
-
-  sttxr       wzr, w4, [sp]
-// CHECK: sttxr        wzr, w4, [sp]                   // encoding: 
[0xe4,0x7f,0x1f,0x89]
-// ERROR: error: instruction requires: lsui
-  sttxr       wzr, w4, [sp, #0]
-// CHECK: sttxr        wzr, w4, [sp]                   // encoding: 
[0xe4,0x7f,0x1f,0x89]
-// ERROR: error: instruction requires: lsui
-  sttxr       w5, x6, [x7]
-// CHECK: sttxr        w5, x6, [x7]                    // encoding: 
[0xe6,0x7c,0x05,0xc9]
-// ERROR: error: instruction requires: lsui
-  sttxr       w5, x6, [x7, #0]
-// CHECK: sttxr        w5, x6, [x7]                    // encoding: 
[0xe6,0x7c,0x05,0xc9]
-// ERROR: error: instruction requires: lsui
-
-  stltxr      w2, w4, [sp]
-// CHECK: stltxr       w2, w4, [sp]                    // encoding: 
[0xe4,0xff,0x02,0x89]
-// ERROR: error: instruction requires: lsui
-  stltxr      w5, x6, [x7]
-// CHECK: stltxr       w5, x6, [x7]                    // encoding: 
[0xe6,0xfc,0x05,0xc9]
-// ERROR: error: instruction requires: lsui
+ldtxr x9, [sp]
+// CHECK-INST: ldtxr x9, [sp]
+// CHECK-ENCODING: encoding: [0xe9,0x7f,0x5f,0xc9]
+// CHECK-ERROR: error: instruction requires: lsui
+// CHECK-UNKNOWN:  c95f7fe9 <unknown>
+// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui
----------------
jthackray wrote:

Thanks, done.

https://github.com/llvm/llvm-project/pull/146331
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to