1 # RUN: llvm-mc -triple=aarch64 -mattr=+brbe -disassemble %s 2> %t | FileCheck %s
2 # RUN: llvm-mc -triple=aarch64 -disassemble %s 2> %t | FileCheck --check-prefix=NO-BRBE %s
6 # CHECK: msr BRBCR_EL1, x0
7 # CHECK: mrs x1, BRBCR_EL1
8 # NO-BRBE: msr S2_1_C9_C0_0, x0
9 # NO-BRBE: mrs x1, S2_1_C9_C0_0
13 # CHECK: msr BRBCR_EL12, x2
14 # CHECK: mrs x3, BRBCR_EL12
15 # NO-BRBE: msr S2_5_C9_C0_0, x2
16 # NO-BRBE: mrs x3, S2_5_C9_C0_0
20 # CHECK: msr BRBCR_EL2, x4
21 # CHECK: mrs x5, BRBCR_EL2
22 # NO-BRBE: msr S2_4_C9_C0_0, x4
23 # NO-BRBE: mrs x5, S2_4_C9_C0_0
27 # CHECK: msr BRBFCR_EL1, x6
28 # CHECK: mrs x7, BRBFCR_EL1
29 # NO-BRBE: msr S2_1_C9_C0_1, x6
30 # NO-BRBE: mrs x7, S2_1_C9_C0_1
32 [0x08,0x92,0x11,0xd5] # expect failure: BRBIDR0_EL1 is RO
34 # CHECK: msr S2_1_C9_C2_0, x8
35 # CHECK: mrs x9, BRBIDR0_EL1
36 # NO-BRBE: msr S2_1_C9_C2_0, x8
37 # NO-BRBE: mrs x9, S2_1_C9_C2_0
41 # CHECK: msr BRBINFINJ_EL1, x10
42 # CHECK: mrs x11, BRBINFINJ_EL1
43 # NO-BRBE: msr S2_1_C9_C1_0, x10
44 # NO-BRBE: mrs x11, S2_1_C9_C1_0
48 # CHECK: msr BRBSRCINJ_EL1, x12
49 # CHECK: mrs x13, BRBSRCINJ_EL1
50 # NO-BRBE: msr S2_1_C9_C1_1, x12
51 # NO-BRBE: mrs x13, S2_1_C9_C1_1
55 # CHECK: msr BRBTGTINJ_EL1, x14
56 # CHECK: mrs x15, BRBTGTINJ_EL1
57 # NO-BRBE: msr S2_1_C9_C1_2, x14
58 # NO-BRBE: mrs x15, S2_1_C9_C1_2
62 # CHECK: msr BRBTS_EL1, x16
63 # CHECK: mrs x17, BRBTS_EL1
64 # NO-BRBE: msr S2_1_C9_C0_2, x16
65 # NO-BRBE: mrs x17, S2_1_C9_C0_2
67 [0x12,0x80,0x11,0xd5] # expect failure: BRBINF0_EL1 is RO
69 # CHECK: msr S2_1_C8_C0_0, x18
70 # CHECK: mrs x19, BRBINF0_EL1
71 # NO-BRBE: msr S2_1_C8_C0_0, x18
72 # NO-BRBE: mrs x19, S2_1_C8_C0_0
74 [0x14,0x81,0x11,0xd5] # expect failure: BRBINF1_EL1 is RO
76 # CHECK: msr S2_1_C8_C1_0, x20
77 # CHECK: mrs x21, BRBINF1_EL1
78 # NO-BRBE: msr S2_1_C8_C1_0, x20
79 # NO-BRBE: mrs x21, S2_1_C8_C1_0
81 [0x16,0x82,0x11,0xd5] # expect failure: BRBINF2_EL1 is RO
83 # CHECK: msr S2_1_C8_C2_0, x22
84 # CHECK: mrs x23, BRBINF2_EL1
85 # NO-BRBE: msr S2_1_C8_C2_0, x22
86 # NO-BRBE: mrs x23, S2_1_C8_C2_0
88 [0x38,0x84,0x11,0xd5] # expect failure: BRBSRC4_EL1 is RO
90 # CHECK: msr S2_1_C8_C4_1, x24
91 # CHECK: mrs x25, BRBSRC4_EL1
92 # NO-BRBE: msr S2_1_C8_C4_1, x24
93 # NO-BRBE: mrs x25, S2_1_C8_C4_1
95 [0x3a,0x88,0x11,0xd5] # expect failure: BRBSRC8_EL1 is RO
97 # CHECK: msr S2_1_C8_C8_1, x26
98 # CHECK: mrs x27, BRBSRC8_EL1
99 # NO-BRBE: msr S2_1_C8_C8_1, x26
100 # NO-BRBE: mrs x27, S2_1_C8_C8_1
102 [0xbc,0x80,0x11,0xd5] # expect failure: BRBSRC16_EL1 is RO
103 [0xbd,0x80,0x31,0xd5]
104 # CHECK: msr S2_1_C8_C0_5, x28
105 # CHECK: mrs x29, BRBSRC16_EL1
106 # NO-BRBE: msr S2_1_C8_C0_5, x28
107 # NO-BRBE: mrs x29, S2_1_C8_C0_5
109 [0x40,0x8a,0x11,0xd5] # expect failure: BRBTGT10_EL1 is RO
110 [0x41,0x8a,0x31,0xd5]
111 # CHECK: msr S2_1_C8_C10_2, x0
112 # CHECK: mrs x1, BRBTGT10_EL1
113 # NO-BRBE: msr S2_1_C8_C10_2, x0
114 # NO-BRBE: mrs x1, S2_1_C8_C10_2
116 [0xc2,0x85,0x11,0xd5] # expect failure: BRBTGT21_EL1 is RO
117 [0xc3,0x85,0x31,0xd5]
118 # CHECK: msr S2_1_C8_C5_6, x2
119 # CHECK: mrs x3, BRBTGT21_EL1
120 # NO-BRBE: msr S2_1_C8_C5_6, x2
121 # NO-BRBE: mrs x3, S2_1_C8_C5_6
123 [0xc4,0x8f,0x11,0xd5] # expect failure: BRBTGT31_EL1 is RO
124 [0xc5,0x8f,0x31,0xd5]
125 # CHECK: msr S2_1_C8_C15_6, x4
126 # CHECK: mrs x5, BRBTGT31_EL1
127 # NO-BRBE: msr S2_1_C8_C15_6, x4
128 # NO-BRBE: mrs x5, S2_1_C8_C15_6