Skip to content

Commit d2b3c5b

Browse files
fixup! [AArch64][llvm] Unify AArch64 tests into a single file (3/4) (NFC)
This is a series of patches (3/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: * removes .txt tests which have multiple feature dependancies * makes the .s tests have a roundabout run line to test both encoding and assembly * creates diagnostic tests when needed Co-authored-by: Virginia Cangelosi <virginia.cangelosi@arm.com>
1 parent af692b7 commit d2b3c5b

File tree

9 files changed

+755
-28
lines changed

9 files changed

+755
-28
lines changed

llvm/test/MC/AArch64/armv8.6a-fgt.s

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,31 @@ msr HFGRTR_EL2, x0
2121
// CHECK-ENCODING: encoding: [0x80,0x11,0x1c,0xd5]
2222
// CHECK-ERROR: :[[@LINE-3]]:5: error: expected writable system register or pstate
2323
// CHECK-UNKNOWN: d51c1180 msr S3_4_C1_C1_4, x0
24+
2425
msr HFGWTR_EL2, x5
2526
// CHECK-INST: msr HFGWTR_EL2, x5
2627
// CHECK-ENCODING: encoding: [0xa5,0x11,0x1c,0xd5]
2728
// CHECK-ERROR: :[[@LINE-3]]:5: error: expected writable system register or pstate
2829
// CHECK-UNKNOWN: d51c11a5 msr S3_4_C1_C1_5, x5
30+
2931
msr HFGITR_EL2, x10
3032
// CHECK-INST: msr HFGITR_EL2, x10
3133
// CHECK-ENCODING: encoding: [0xca,0x11,0x1c,0xd5]
3234
// CHECK-ERROR: :[[@LINE-3]]:5: error: expected writable system register or pstate
3335
// CHECK-UNKNOWN: d51c11ca msr S3_4_C1_C1_6, x10
36+
3437
msr HDFGRTR_EL2, x15
3538
// CHECK-INST: msr HDFGRTR_EL2, x15
3639
// CHECK-ENCODING: encoding: [0x8f,0x31,0x1c,0xd5]
3740
// CHECK-ERROR: :[[@LINE-3]]:5: error: expected writable system register or pstate
3841
// CHECK-UNKNOWN: d51c318f msr S3_4_C3_C1_4, x15
42+
3943
msr HDFGWTR_EL2, x20
4044
// CHECK-INST: msr HDFGWTR_EL2, x20
4145
// CHECK-ENCODING: encoding: [0xb4,0x31,0x1c,0xd5]
4246
// CHECK-ERROR: :[[@LINE-3]]:5: error: expected writable system register or pstate
4347
// CHECK-UNKNOWN: d51c31b4 msr S3_4_C3_C1_5, x20
48+
4449
msr HAFGRTR_EL2, x25
4550
// CHECK-INST: msr HAFGRTR_EL2, x25
4651
// CHECK-ENCODING: encoding: [0xd9,0x31,0x1c,0xd5]
@@ -52,80 +57,91 @@ mrs x30, HFGRTR_EL2
5257
// CHECK-ENCODING: encoding: [0x9e,0x11,0x3c,0xd5]
5358
// CHECK-ERROR: :[[@LINE-3]]:11: error: expected readable system register
5459
// CHECK-UNKNOWN: d53c119e mrs x30, S3_4_C1_C1_4
60+
5561
mrs x25, HFGWTR_EL2
5662
// CHECK-INST: mrs x25, HFGWTR_EL2
5763
// CHECK-ENCODING: encoding: [0xb9,0x11,0x3c,0xd5]
5864
// CHECK-ERROR: :[[@LINE-3]]:11: error: expected readable system register
5965
// CHECK-UNKNOWN: d53c11b9 mrs x25, S3_4_C1_C1_5
66+
6067
mrs x20, HFGITR_EL2
6168
// CHECK-INST: mrs x20, HFGITR_EL2
6269
// CHECK-ENCODING: encoding: [0xd4,0x11,0x3c,0xd5]
6370
// CHECK-ERROR: :[[@LINE-3]]:11: error: expected readable system register
6471
// CHECK-UNKNOWN: d53c11d4 mrs x20, S3_4_C1_C1_6
72+
6573
mrs x15, HDFGRTR_EL2
6674
// CHECK-INST: mrs x15, HDFGRTR_EL2
6775
// CHECK-ENCODING: encoding: [0x8f,0x31,0x3c,0xd5]
6876
// CHECK-ERROR: :[[@LINE-3]]:11: error: expected readable system register
6977
// CHECK-UNKNOWN: d53c318f mrs x15, S3_4_C3_C1_4
78+
7079
mrs x10, HDFGWTR_EL2
7180
// CHECK-INST: mrs x10, HDFGWTR_EL2
7281
// CHECK-ENCODING: encoding: [0xaa,0x31,0x3c,0xd5]
7382
// CHECK-ERROR: :[[@LINE-3]]:11: error: expected readable system register
7483
// CHECK-UNKNOWN: d53c31aa mrs x10, S3_4_C3_C1_5
84+
7585
mrs x5, HAFGRTR_EL2
7686
// CHECK-INST: mrs x5, HAFGRTR_EL2
7787
// CHECK-ENCODING: encoding: [0xc5,0x31,0x3c,0xd5]
7888
// CHECK-ERROR: :[[@LINE-3]]:11: error: expected readable system register
7989
// CHECK-UNKNOWN: d53c31c5 mrs x5, S3_4_C3_C1_6
8090

81-
8291
mrs x3, HDFGRTR2_EL2
8392
// CHECK-INST: mrs x3, HDFGRTR2_EL2
8493
// CHECK-ENCODING: encoding: [0x03,0x31,0x3c,0xd5]
8594
// CHECK-ERROR: :[[@LINE-3]]:9: error: expected readable system register
8695
// CHECK-UNKNOWN: d53c3103 mrs x3, S3_4_C3_C1_0
96+
8797
mrs x3, HDFGWTR2_EL2
8898
// CHECK-INST: mrs x3, HDFGWTR2_EL2
8999
// CHECK-ENCODING: encoding: [0x23,0x31,0x3c,0xd5]
90100
// CHECK-ERROR: :[[@LINE-3]]:9: error: expected readable system register
91101
// CHECK-UNKNOWN: d53c3123 mrs x3, S3_4_C3_C1_1
102+
92103
mrs x3, HFGRTR2_EL2
93104
// CHECK-INST: mrs x3, HFGRTR2_EL2
94105
// CHECK-ENCODING: encoding: [0x43,0x31,0x3c,0xd5]
95106
// CHECK-ERROR: :[[@LINE-3]]:9: error: expected readable system register
96107
// CHECK-UNKNOWN: d53c3143 mrs x3, S3_4_C3_C1_2
108+
97109
mrs x3, HFGWTR2_EL2
98110
// CHECK-INST: mrs x3, HFGWTR2_EL2
99111
// CHECK-ENCODING: encoding: [0x63,0x31,0x3c,0xd5]
100112
// CHECK-ERROR: :[[@LINE-3]]:9: error: expected readable system register
101113
// CHECK-UNKNOWN: d53c3163 mrs x3, S3_4_C3_C1_3
114+
102115
mrs x3, HFGITR2_EL2
103116
// CHECK-INST: mrs x3, HFGITR2_EL2
104117
// CHECK-ENCODING: encoding: [0xe3,0x31,0x3c,0xd5]
105118
// CHECK-ERROR: :[[@LINE-3]]:9: error: expected readable system register
106119
// CHECK-UNKNOWN: d53c31e3 mrs x3, S3_4_C3_C1_7
107120

108-
109121
msr HDFGRTR2_EL2, x3
110122
// CHECK-INST: msr HDFGRTR2_EL2, x3
111123
// CHECK-ENCODING: encoding: [0x03,0x31,0x1c,0xd5]
112124
// CHECK-ERROR: :[[@LINE-3]]:5: error: expected writable system register or pstate
113125
// CHECK-UNKNOWN: d51c3103 msr S3_4_C3_C1_0, x3
126+
114127
msr HDFGWTR2_EL2, x3
115128
// CHECK-INST: msr HDFGWTR2_EL2, x3
116129
// CHECK-ENCODING: encoding: [0x23,0x31,0x1c,0xd5]
117130
// CHECK-ERROR: :[[@LINE-3]]:5: error: expected writable system register or pstate
118131
// CHECK-UNKNOWN: d51c3123 msr S3_4_C3_C1_1, x3
132+
119133
msr HFGRTR2_EL2, x3
120134
// CHECK-INST: msr HFGRTR2_EL2, x3
121135
// CHECK-ENCODING: encoding: [0x43,0x31,0x1c,0xd5]
122136
// CHECK-ERROR: :[[@LINE-3]]:5: error: expected writable system register or pstate
123137
// CHECK-UNKNOWN: d51c3143 msr S3_4_C3_C1_2, x3
138+
124139
msr HFGWTR2_EL2, x3
125140
// CHECK-INST: msr HFGWTR2_EL2, x3
126141
// CHECK-ENCODING: encoding: [0x63,0x31,0x1c,0xd5]
127142
// CHECK-ERROR: :[[@LINE-3]]:5: error: expected writable system register or pstate
128143
// CHECK-UNKNOWN: d51c3163 msr S3_4_C3_C1_3, x3
144+
129145
msr HFGITR2_EL2, x3
130146
// CHECK-INST: msr HFGITR2_EL2, x3
131147
// CHECK-ENCODING: encoding: [0xe3,0x31,0x1c,0xd5]

0 commit comments

Comments
 (0)