================
@@ -1,592 +1,697 @@
-// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding              
 -mattr=+the -mattr=+d128 < %s | FileCheck %s
-// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding 
-mattr=+v8.9a -mattr=+the -mattr=+d128 < %s | FileCheck %s
-// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding 
-mattr=+v9.4a -mattr=+the -mattr=+d128 < %s | FileCheck %s
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+the,+d128 < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+the,+d128,v8.9a < %s \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+the,+d128,v9.4a < %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=+the,+d128 < %s \
+// RUN:        | llvm-objdump -d --mattr=+the,+d128 - | FileCheck %s 
--check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+the,+d128 < %s \
+// RUN:   | llvm-objdump -d --mattr=-the,-d128 - | FileCheck %s 
--check-prefix=CHECK-UNKNOWN
+// Disassemble encoding and check the re-encoding (-show-encoding) matches.
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+the,+d128 < %s \
+// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
+// RUN:        | llvm-mc -triple=aarch64 -mattr=+the,+d128 -disassemble 
-show-encoding \
+// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
 
-// RUN: not llvm-mc -triple aarch64-none-linux-gnu                           < 
%s 2>&1 | FileCheck --check-prefix=ERROR-NO-THE %s
-// RUN: not llvm-mc -triple aarch64-none-linux-gnu -mattr=+v8.9a             < 
%s 2>&1 | FileCheck --check-prefix=ERROR-NO-THE %s
-// RUN: not llvm-mc -triple aarch64-none-linux-gnu -mattr=+v9.4a             < 
%s 2>&1 | FileCheck --check-prefix=ERROR-NO-THE %s
 
-// RUN: not llvm-mc -triple aarch64-none-linux-gnu               -mattr=+the < 
%s 2>&1 | FileCheck --check-prefix=ERROR-NO-D128 %s
-// RUN: not llvm-mc -triple aarch64-none-linux-gnu -mattr=+v8.9a -mattr=+the < 
%s 2>&1 | FileCheck --check-prefix=ERROR-NO-D128 %s
-// RUN: not llvm-mc -triple aarch64-none-linux-gnu -mattr=+v9.4a -mattr=+the < 
%s 2>&1 | FileCheck --check-prefix=ERROR-NO-D128 %s
+mrs x3, RCWMASK_EL1
+// CHECK-INST: mrs x3, RCWMASK_EL1
+// CHECK-ENCODING: encoding: [0xc3,0xd0,0x38,0xd5]
+// CHECK-ERROR: error: expected readable system register
+// CHECK-UNKNOWN:  d538d0c3      mrs x3, S3_0_C13_C0_6
 
-// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+the 
-mattr=+d128 < %s 2>&1 | FileCheck --check-prefix=ERROR-NO-ZXR %s
+msr RCWMASK_EL1, x1
+// CHECK-INST: msr RCWMASK_EL1, x1
+// CHECK-ENCODING: encoding: [0xc1,0xd0,0x18,0xd5]
+// CHECK-ERROR: error: expected writable system register or pstate
+// CHECK-UNKNOWN:  d518d0c1      msr S3_0_C13_C0_6, x1
 
-            mrs x3, RCWMASK_EL1
-// CHECK:   mrs x3, RCWMASK_EL1   // encoding: [0xc3,0xd0,0x38,0xd5]
-// ERROR-NO-THE: [[@LINE-2]]:21: error: expected readable system register
-            msr RCWMASK_EL1, x1
-// CHECK:   msr RCWMASK_EL1, x1   // encoding: [0xc1,0xd0,0x18,0xd5]
-// ERROR-NO-THE: [[@LINE-2]]:17: error: expected writable system register or 
pstate
-            mrs x3, RCWSMASK_EL1
-// CHECK:   mrs x3, RCWSMASK_EL1  // encoding: [0x63,0xd0,0x38,0xd5]
-// ERROR-NO-THE: [[@LINE-2]]:21: error: expected readable system register
-            msr RCWSMASK_EL1, x1
-// CHECK:   msr RCWSMASK_EL1, x1  // encoding: [0x61,0xd0,0x18,0xd5]
-// ERROR-NO-THE: [[@LINE-2]]:17: error: expected writable system register or 
pstate
+mrs x3, RCWSMASK_EL1
+// CHECK-INST: mrs x3, RCWSMASK_EL1
+// CHECK-ENCODING: encoding: [0x63,0xd0,0x38,0xd5]
+// CHECK-ERROR: error: expected readable system register
+// CHECK-UNKNOWN:  d538d063      mrs x3, S3_0_C13_C0_3
+msr RCWSMASK_EL1, x1
+// CHECK-INST: msr RCWSMASK_EL1, x1
+// CHECK-ENCODING: encoding: [0x61,0xd0,0x18,0xd5]
+// CHECK-ERROR: error: expected writable system register or pstate
+// CHECK-UNKNOWN:  d518d061      msr S3_0_C13_C0_3, x1
 
-            rcwcas   x0, x1, [x4]
-// CHECK:   rcwcas   x0, x1, [x4] // encoding: [0x81,0x08,0x20,0x19]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwcasa  x0, x1, [x4]
-// CHECK:   rcwcasa  x0, x1, [x4] // encoding: [0x81,0x08,0xa0,0x19]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwcasal x0, x1, [x4]
-// CHECK:   rcwcasal x0, x1, [x4] // encoding: [0x81,0x08,0xe0,0x19]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwcasl  x0, x1, [x4]
-// CHECK:   rcwcasl  x0, x1, [x4] // encoding: [0x81,0x08,0x60,0x19]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwcas   x3, x5, [sp]
-// CHECK:   rcwcas   x3, x5, [sp] // encoding: [0xe5,0x0b,0x23,0x19]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwcasa  x3, x5, [sp]
-// CHECK:   rcwcasa  x3, x5, [sp] // encoding: [0xe5,0x0b,0xa3,0x19]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwcasal x3, x5, [sp]
-// CHECK:   rcwcasal x3, x5, [sp] // encoding: [0xe5,0x0b,0xe3,0x19]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwcasl  x3, x5, [sp]
-// CHECK:   rcwcasl  x3, x5, [sp] // encoding: [0xe5,0x0b,0x63,0x19]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
+rcwcas   x0, x1, [x4]
+// CHECK-INST: rcwcas x0, x1, [x4]
+// CHECK-ENCODING: encoding: [0x81,0x08,0x20,0x19]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  19200881      <unknown>
+rcwcasa  x0, x1, [x4]
+// CHECK-INST: rcwcasa x0, x1, [x4]
+// CHECK-ENCODING: encoding: [0x81,0x08,0xa0,0x19]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  19a00881      <unknown>
+rcwcasal x0, x1, [x4]
+// CHECK-INST: rcwcasal x0, x1, [x4]
+// CHECK-ENCODING: encoding: [0x81,0x08,0xe0,0x19]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  19e00881      <unknown>
+rcwcasl  x0, x1, [x4]
+// CHECK-INST: rcwcasl x0, x1, [x4]
+// CHECK-ENCODING: encoding: [0x81,0x08,0x60,0x19]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  19600881      <unknown>
+rcwcas   x3, x5, [sp]
+// CHECK-INST: rcwcas x3, x5, [sp]
+// CHECK-ENCODING: encoding: [0xe5,0x0b,0x23,0x19]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  19230be5      <unknown>
+rcwcasa  x3, x5, [sp]
+// CHECK-INST: rcwcasa x3, x5, [sp]
+// CHECK-ENCODING: encoding: [0xe5,0x0b,0xa3,0x19]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  19a30be5      <unknown>
+rcwcasal x3, x5, [sp]
+// CHECK-INST: rcwcasal x3, x5, [sp]
+// CHECK-ENCODING: encoding: [0xe5,0x0b,0xe3,0x19]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  19e30be5      <unknown>
+rcwcasl  x3, x5, [sp]
+// CHECK-INST: rcwcasl x3, x5, [sp]
+// CHECK-ENCODING: encoding: [0xe5,0x0b,0x63,0x19]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  19630be5      <unknown>
 
-            rcwscas   x0, x1, [x4]
-// CHECK:   rcwscas   x0, x1, [x4] // encoding: [0x81,0x08,0x20,0x59]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwscasa  x0, x1, [x4]
-// CHECK:   rcwscasa  x0, x1, [x4] // encoding: [0x81,0x08,0xa0,0x59]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwscasal x0, x1, [x4]
-// CHECK:   rcwscasal x0, x1, [x4] // encoding: [0x81,0x08,0xe0,0x59]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwscasl  x0, x1, [x4]
-// CHECK:   rcwscasl  x0, x1, [x4] // encoding: [0x81,0x08,0x60,0x59]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwscas   x3, x5, [sp]
-// CHECK:   rcwscas   x3, x5, [sp] // encoding: [0xe5,0x0b,0x23,0x59]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwscasa  x3, x5, [sp]
-// CHECK:   rcwscasa  x3, x5, [sp] // encoding: [0xe5,0x0b,0xa3,0x59]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwscasal x3, x5, [sp]
-// CHECK:   rcwscasal x3, x5, [sp] // encoding: [0xe5,0x0b,0xe3,0x59]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
-            rcwscasl  x3, x5, [sp]
-// CHECK:   rcwscasl  x3, x5, [sp] // encoding: [0xe5,0x0b,0x63,0x59]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: the
+rcwscas   x0, x1, [x4]
+// CHECK-INST: rcwscas x0, x1, [x4]
+// CHECK-ENCODING: encoding: [0x81,0x08,0x20,0x59]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  59200881      <unknown>
+rcwscasa  x0, x1, [x4]
+// CHECK-INST: rcwscasa x0, x1, [x4]
+// CHECK-ENCODING: encoding: [0x81,0x08,0xa0,0x59]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  59a00881      <unknown>
+rcwscasal x0, x1, [x4]
+// CHECK-INST: rcwscasal x0, x1, [x4]
+// CHECK-ENCODING: encoding: [0x81,0x08,0xe0,0x59]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  59e00881      <unknown>
+rcwscasl  x0, x1, [x4]
+// CHECK-INST: rcwscasl x0, x1, [x4]
+// CHECK-ENCODING: encoding: [0x81,0x08,0x60,0x59]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  59600881      <unknown>
+rcwscas   x3, x5, [sp]
+// CHECK-INST: rcwscas x3, x5, [sp]
+// CHECK-ENCODING: encoding: [0xe5,0x0b,0x23,0x59]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  59230be5      <unknown>
+rcwscasa  x3, x5, [sp]
+// CHECK-INST: rcwscasa x3, x5, [sp]
+// CHECK-ENCODING: encoding: [0xe5,0x0b,0xa3,0x59]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  59a30be5      <unknown>
+rcwscasal x3, x5, [sp]
+// CHECK-INST: rcwscasal x3, x5, [sp]
+// CHECK-ENCODING: encoding: [0xe5,0x0b,0xe3,0x59]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  59e30be5      <unknown>
+rcwscasl  x3, x5, [sp]
+// CHECK-INST: rcwscasl x3, x5, [sp]
+// CHECK-ENCODING: encoding: [0xe5,0x0b,0x63,0x59]
+// CHECK-ERROR: error: instruction requires: the
+// CHECK-UNKNOWN:  59630be5      <unknown>
 
-            rcwcasp   x0, x1, x6, x7, [x4]
-// CHECK:   rcwcasp   x0, x1, x6, x7, [x4] // encoding: [0x86,0x0c,0x20,0x19]
-// ERROR-NO-THE: [[@LINE-2]]:13: error: instruction requires: d128 the
-// ERROR-NO-D128: [[@LINE-3]]:13: error: instruction requires: d128
----------------
jthackray wrote:

Thanks, re-added.

https://github.com/llvm/llvm-project/pull/146330
_______________________________________________
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