Skip to content

Commit a788f61

Browse files
fixup! [AArch64][llvm] Unify AArch64 tests into a single file (1/4) (NFC)
This is a series of patches (1/4) to unify assembly/disassembly of recent AArch64 tests into a single file. The aim is to improve consistency, so that all instructions and system registers are thoroughly tested, and future test cases will be in a unified format. This patch: * unifies errorless .s and .txt tests into a single file * remove .txt tests which don't have feature requirements * makes the .s tests have a roundabout run line to test both encoding and assembly Co-authored-by: Virginia Cangelosi <[email protected]>
1 parent 0a3b0e4 commit a788f61

11 files changed

+67
-37
lines changed

llvm/test/MC/AArch64/armv8.9a-ats1a.s

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
22
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
33
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
4-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
5-
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
6-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
4+
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefixes=CHECK-UNKNOWN
75
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
86
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
97
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \

llvm/test/MC/AArch64/armv9.4a-ebep.s

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
11
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
22
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
33
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
4-
// RUN: | llvm-objdump -d --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-INST
5-
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
6-
// RUN: | llvm-objdump -d --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-UNKNOWN
4+
// RUN: | llvm-objdump -d --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-UNKNOWN
75
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
86
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
97
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
108
// RUN: | llvm-mc -triple=aarch64 -disassemble -show-encoding \
119
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
1210

1311

14-
1512
mrs x2, PM
1613
// CHECK-INST: mrs x2, PM
1714
// CHECK-ENCODING: encoding: [0x22,0x43,0x38,0xd5]
1815
// CHECK-UNKNOWN: d5384322 mrs x2, PM
16+
1917
mrs x3, PM
2018
// CHECK-INST: mrs x3, PM
2119
// CHECK-ENCODING: encoding: [0x23,0x43,0x38,0xd5]
2220
// CHECK-UNKNOWN: d5384323 mrs x3, PM
21+
2322
msr PM, x3
2423
// CHECK-INST: msr PM, x3
2524
// CHECK-ENCODING: encoding: [0x23,0x43,0x18,0xd5]
2625
// CHECK-UNKNOWN: d5184323 msr PM, x3
26+
2727
msr PM, x6
2828
// CHECK-INST: msr PM, x6
2929
// CHECK-ENCODING: encoding: [0x26,0x43,0x18,0xd5]
3030
// CHECK-UNKNOWN: d5184326 msr PM, x6
31+
3132
msr PM, #0
3233
// CHECK-INST: msr PM, #0
3334
// CHECK-ENCODING: encoding: [0x1f,0x42,0x01,0xd5]
3435
// CHECK-UNKNOWN: d501421f msr PM, #0
36+
3537
msr PM, #1
3638
// CHECK-INST: msr PM, #1
3739
// CHECK-ENCODING: encoding: [0x1f,0x43,0x01,0xd5]

llvm/test/MC/AArch64/armv9.5a-e3dse.s

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
22
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
33
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
4-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
5-
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
6-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
4+
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
75
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
86
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
97
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \

llvm/test/MC/AArch64/armv9.5a-fgwte3.s

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
22
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
33
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
4-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
5-
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
6-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
4+
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
75
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
86
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
97
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
108
// RUN: | llvm-mc -triple=aarch64 -disassemble -show-encoding \
119
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
1210

1311

14-
1512
mrs x0, FGWTE3_EL3
1613
// CHECK-INST: mrs x0, FGWTE3_EL3
1714
// CHECK-ENCODING: encoding: [0xa0,0x11,0x3e,0xd5]
1815
// CHECK-UNKNOWN: d53e11a0 mrs x0, FGWTE3_EL3
16+
1917
msr FGWTE3_EL3, x0
2018
// CHECK-INST: msr FGWTE3_EL3, x0
2119
// CHECK-ENCODING: encoding: [0xa0,0x11,0x1e,0xd5]

llvm/test/MC/AArch64/armv9.5a-hacdbs.s

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
22
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
33
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
4-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
5-
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
6-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
4+
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
75
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
86
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
97
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
108
// RUN: | llvm-mc -triple=aarch64 -disassemble -show-encoding \
119
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
1210

1311

14-
1512
mrs x0, HACDBSBR_EL2
1613
// CHECK-INST: mrs x0, HACDBSBR_EL2
1714
// CHECK-ENCODING: encoding: [0x80,0x23,0x3c,0xd5]
1815
// CHECK-UNKNOWN: d53c2380 mrs x0, HACDBSBR_EL2
16+
1917
msr HACDBSBR_EL2, x0
2018
// CHECK-INST: msr HACDBSBR_EL2, x0
2119
// CHECK-ENCODING: encoding: [0x80,0x23,0x1c,0xd5]
@@ -25,6 +23,7 @@ mrs x0, HACDBSCONS_EL2
2523
// CHECK-INST: mrs x0, HACDBSCONS_EL2
2624
// CHECK-ENCODING: encoding: [0xa0,0x23,0x3c,0xd5]
2725
// CHECK-UNKNOWN: d53c23a0 mrs x0, HACDBSCONS_EL2
26+
2827
msr HACDBSCONS_EL2, x0
2928
// CHECK-INST: msr HACDBSCONS_EL2, x0
3029
// CHECK-ENCODING: encoding: [0xa0,0x23,0x1c,0xd5]

llvm/test/MC/AArch64/armv9.5a-hdbss.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
22
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
33
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
4-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
5-
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
6-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
4+
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
75
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
86
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
97
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
@@ -16,6 +14,7 @@ mrs x0, HDBSSBR_EL2
1614
// CHECK-INST: mrs x0, HDBSSBR_EL2
1715
// CHECK-ENCODING: encoding: [0x40,0x23,0x3c,0xd5]
1816
// CHECK-UNKNOWN: d53c2340 mrs x0, HDBSSBR_EL2
17+
1918
msr HDBSSBR_EL2, x0
2019
// CHECK-INST: msr HDBSSBR_EL2, x0
2120
// CHECK-ENCODING: encoding: [0x40,0x23,0x1c,0xd5]
@@ -25,6 +24,7 @@ mrs x0, HDBSSPROD_EL2
2524
// CHECK-INST: mrs x0, HDBSSPROD_EL2
2625
// CHECK-ENCODING: encoding: [0x60,0x23,0x3c,0xd5]
2726
// CHECK-UNKNOWN: d53c2360 mrs x0, HDBSSPROD_EL2
27+
2828
msr HDBSSPROD_EL2, x0
2929
// CHECK-INST: msr HDBSSPROD_EL2, x0
3030
// CHECK-ENCODING: encoding: [0x60,0x23,0x1c,0xd5]

llvm/test/MC/AArch64/armv9.5a-spmu2.s

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
22
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
33
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
4-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
5-
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
6-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
4+
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
75
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
86
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
97
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \

llvm/test/MC/AArch64/armv9.5a-step2.s

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
22
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
33
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
4-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
5-
// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \
6-
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
4+
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
75
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
86
// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \
97
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \

0 commit comments

Comments
 (0)