[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / Mips / macro-dla-32bit.s
blob2fd6abfe42f4b59bde3aede63eb652b7b4724f57
1 # RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips32r2 | \
2 # RUN: FileCheck %s
3 # RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips32r6 | \
4 # RUN: FileCheck %s
6 .set mips64r2
8 dla $5, 0x00000001 # CHECK: addiu $5, $zero, 1 # encoding: [0x24,0x05,0x00,0x01]
9 dla $5, 0x00000002 # CHECK: addiu $5, $zero, 2 # encoding: [0x24,0x05,0x00,0x02]
10 dla $5, 0x00004000 # CHECK: addiu $5, $zero, 16384 # encoding: [0x24,0x05,0x40,0x00]
11 dla $5, 0x00008000 # CHECK: ori $5, $zero, 32768 # encoding: [0x34,0x05,0x80,0x00]
12 dla $5, 0xffffffff # CHECK: addiu $5, $zero, -1 # encoding: [0x24,0x05,0xff,0xff]
13 dla $5, 0xfffffffe # CHECK: addiu $5, $zero, -2 # encoding: [0x24,0x05,0xff,0xfe]
14 dla $5, 0xffffc000 # CHECK: addiu $5, $zero, -16384 # encoding: [0x24,0x05,0xc0,0x00]
15 dla $5, 0xffff8000 # CHECK: addiu $5, $zero, -32768 # encoding: [0x24,0x05,0x80,0x00]
17 dla $5, 0x00010000 # CHECK: lui $5, 1 # encoding: [0x3c,0x05,0x00,0x01]
18 dla $5, 0x00020000 # CHECK: lui $5, 2 # encoding: [0x3c,0x05,0x00,0x02]
19 dla $5, 0x40000000 # CHECK: lui $5, 16384 # encoding: [0x3c,0x05,0x40,0x00]
20 dla $5, 0x80000000 # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
21 dla $5, 0xffff0000 # CHECK: lui $5, 65535 # encoding: [0x3c,0x05,0xff,0xff]
22 dla $5, 0xfffe0000 # CHECK: lui $5, 65534 # encoding: [0x3c,0x05,0xff,0xfe]
23 dla $5, 0xc0000000 # CHECK: lui $5, 49152 # encoding: [0x3c,0x05,0xc0,0x00]
24 dla $5, 0x80000000 # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
26 dla $5, 0x00010001 # CHECK: lui $5, 1 # encoding: [0x3c,0x05,0x00,0x01]
27 # CHECK: ori $5, $5, 1 # encoding: [0x34,0xa5,0x00,0x01]
28 dla $5, 0x00020001 # CHECK: lui $5, 2 # encoding: [0x3c,0x05,0x00,0x02]
29 # CHECK: ori $5, $5, 1 # encoding: [0x34,0xa5,0x00,0x01]
30 dla $5, 0x40000001 # CHECK: lui $5, 16384 # encoding: [0x3c,0x05,0x40,0x00]
31 # CHECK: ori $5, $5, 1 # encoding: [0x34,0xa5,0x00,0x01]
32 dla $5, 0x80000001 # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
33 # CHECK: ori $5, $5, 1 # encoding: [0x34,0xa5,0x00,0x01]
34 dla $5, 0x00010002 # CHECK: lui $5, 1 # encoding: [0x3c,0x05,0x00,0x01]
35 # CHECK: ori $5, $5, 2 # encoding: [0x34,0xa5,0x00,0x02]
36 dla $5, 0x00020002 # CHECK: lui $5, 2 # encoding: [0x3c,0x05,0x00,0x02]
37 # CHECK: ori $5, $5, 2 # encoding: [0x34,0xa5,0x00,0x02]
38 dla $5, 0x40000002 # CHECK: lui $5, 16384 # encoding: [0x3c,0x05,0x40,0x00]
39 # CHECK: ori $5, $5, 2 # encoding: [0x34,0xa5,0x00,0x02]
40 dla $5, 0x80000002 # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
41 # CHECK: ori $5, $5, 2 # encoding: [0x34,0xa5,0x00,0x02]
42 dla $5, 0x00014000 # CHECK: lui $5, 1 # encoding: [0x3c,0x05,0x00,0x01]
43 # CHECK: ori $5, $5, 16384 # encoding: [0x34,0xa5,0x40,0x00]
44 dla $5, 0x00024000 # CHECK: lui $5, 2 # encoding: [0x3c,0x05,0x00,0x02]
45 # CHECK: ori $5, $5, 16384 # encoding: [0x34,0xa5,0x40,0x00]
46 dla $5, 0x40004000 # CHECK: lui $5, 16384 # encoding: [0x3c,0x05,0x40,0x00]
47 # CHECK: ori $5, $5, 16384 # encoding: [0x34,0xa5,0x40,0x00]
48 dla $5, 0x80004000 # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
49 # CHECK: ori $5, $5, 16384 # encoding: [0x34,0xa5,0x40,0x00]
50 dla $5, 0x00018000 # CHECK: lui $5, 1 # encoding: [0x3c,0x05,0x00,0x01]
51 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
52 dla $5, 0x00028000 # CHECK: lui $5, 2 # encoding: [0x3c,0x05,0x00,0x02]
53 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
54 dla $5, 0x40008000 # CHECK: lui $5, 16384 # encoding: [0x3c,0x05,0x40,0x00]
55 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
56 dla $5, 0x80008000 # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
57 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
58 dla $5, 0xffff4000 # CHECK: lui $5, 65535 # encoding: [0x3c,0x05,0xff,0xff]
59 # CHECK: ori $5, $5, 16384 # encoding: [0x34,0xa5,0x40,0x00]
60 dla $5, 0xfffe8000 # CHECK: lui $5, 65534 # encoding: [0x3c,0x05,0xff,0xfe]
61 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
62 dla $5, 0xc0008000 # CHECK: lui $5, 49152 # encoding: [0x3c,0x05,0xc0,0x00]
63 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
64 dla $5, 0x80008000 # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
65 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
67 dla $5, 0x00000001($6) # CHECK: addiu $5, $6, 1 # encoding: [0x24,0xc5,0x00,0x01]
68 dla $5, 0x00000002($6) # CHECK: addiu $5, $6, 2 # encoding: [0x24,0xc5,0x00,0x02]
69 dla $5, 0x00004000($6) # CHECK: addiu $5, $6, 16384 # encoding: [0x24,0xc5,0x40,0x00]
70 dla $5, 0x00008000($6) # CHECK: ori $5, $zero, 32768 # encoding: [0x34,0x05,0x80,0x00]
71 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
72 dla $5, 0xffffffff($6) # CHECK: addiu $5, $6, -1 # encoding: [0x24,0xc5,0xff,0xff]
73 dla $5, 0xfffffffe($6) # CHECK: addiu $5, $6, -2 # encoding: [0x24,0xc5,0xff,0xfe]
74 dla $5, 0xffffc000($6) # CHECK: addiu $5, $6, -16384 # encoding: [0x24,0xc5,0xc0,0x00]
75 dla $5, 0xffff8000($6) # CHECK: addiu $5, $6, -32768 # encoding: [0x24,0xc5,0x80,0x00]
77 dla $5, 0x00010000($6) # CHECK: lui $5, 1 # encoding: [0x3c,0x05,0x00,0x01]
78 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
79 dla $5, 0x00020000($6) # CHECK: lui $5, 2 # encoding: [0x3c,0x05,0x00,0x02]
80 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
81 dla $5, 0x40000000($6) # CHECK: lui $5, 16384 # encoding: [0x3c,0x05,0x40,0x00]
82 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
83 dla $5, 0x80000000($6) # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
84 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
85 dla $5, 0xffff0000($6) # CHECK: lui $5, 65535 # encoding: [0x3c,0x05,0xff,0xff]
86 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
87 dla $5, 0xfffe0000($6) # CHECK: lui $5, 65534 # encoding: [0x3c,0x05,0xff,0xfe]
88 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
89 dla $5, 0xc0000000($6) # CHECK: lui $5, 49152 # encoding: [0x3c,0x05,0xc0,0x00]
90 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
91 dla $5, 0x80000000($6) # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
92 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
94 dla $5, 0x00010001($6) # CHECK: lui $5, 1 # encoding: [0x3c,0x05,0x00,0x01]
95 # CHECK: ori $5, $5, 1 # encoding: [0x34,0xa5,0x00,0x01]
96 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
97 dla $5, 0x00020001($6) # CHECK: lui $5, 2 # encoding: [0x3c,0x05,0x00,0x02]
98 # CHECK: ori $5, $5, 1 # encoding: [0x34,0xa5,0x00,0x01]
99 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
100 dla $5, 0x40000001($6) # CHECK: lui $5, 16384 # encoding: [0x3c,0x05,0x40,0x00]
101 # CHECK: ori $5, $5, 1 # encoding: [0x34,0xa5,0x00,0x01]
102 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
103 dla $5, 0x80000001($6) # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
104 # CHECK: ori $5, $5, 1 # encoding: [0x34,0xa5,0x00,0x01]
105 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
106 dla $5, 0x00010002($6) # CHECK: lui $5, 1 # encoding: [0x3c,0x05,0x00,0x01]
107 # CHECK: ori $5, $5, 2 # encoding: [0x34,0xa5,0x00,0x02]
108 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
109 dla $5, 0x00020002($6) # CHECK: lui $5, 2 # encoding: [0x3c,0x05,0x00,0x02]
110 # CHECK: ori $5, $5, 2 # encoding: [0x34,0xa5,0x00,0x02]
111 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
112 dla $5, 0x40000002($6) # CHECK: lui $5, 16384 # encoding: [0x3c,0x05,0x40,0x00]
113 # CHECK: ori $5, $5, 2 # encoding: [0x34,0xa5,0x00,0x02]
114 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
115 dla $5, 0x80000002($6) # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
116 # CHECK: ori $5, $5, 2 # encoding: [0x34,0xa5,0x00,0x02]
117 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
118 dla $5, 0x00014000($6) # CHECK: lui $5, 1 # encoding: [0x3c,0x05,0x00,0x01]
119 # CHECK: ori $5, $5, 16384 # encoding: [0x34,0xa5,0x40,0x00]
120 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
121 dla $5, 0x00024000($6) # CHECK: lui $5, 2 # encoding: [0x3c,0x05,0x00,0x02]
122 # CHECK: ori $5, $5, 16384 # encoding: [0x34,0xa5,0x40,0x00]
123 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
124 dla $5, 0x40004000($6) # CHECK: lui $5, 16384 # encoding: [0x3c,0x05,0x40,0x00]
125 # CHECK: ori $5, $5, 16384 # encoding: [0x34,0xa5,0x40,0x00]
126 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
127 dla $5, 0x80004000($6) # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
128 # CHECK: ori $5, $5, 16384 # encoding: [0x34,0xa5,0x40,0x00]
129 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
130 dla $5, 0x00018000($6) # CHECK: lui $5, 1 # encoding: [0x3c,0x05,0x00,0x01]
131 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
132 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
133 dla $5, 0x00028000($6) # CHECK: lui $5, 2 # encoding: [0x3c,0x05,0x00,0x02]
134 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
135 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
136 dla $5, 0x40008000($6) # CHECK: lui $5, 16384 # encoding: [0x3c,0x05,0x40,0x00]
137 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
138 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
139 dla $5, 0x80008000($6) # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
140 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
141 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
142 dla $5, 0xffff4000($6) # CHECK: lui $5, 65535 # encoding: [0x3c,0x05,0xff,0xff]
143 # CHECK: ori $5, $5, 16384 # encoding: [0x34,0xa5,0x40,0x00]
144 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
145 dla $5, 0xfffe8000($6) # CHECK: lui $5, 65534 # encoding: [0x3c,0x05,0xff,0xfe]
146 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
147 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
148 dla $5, 0xc0008000($6) # CHECK: lui $5, 49152 # encoding: [0x3c,0x05,0xc0,0x00]
149 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
150 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
151 dla $5, 0x80008000($6) # CHECK: lui $5, 32768 # encoding: [0x3c,0x05,0x80,0x00]
152 # CHECK: ori $5, $5, 32768 # encoding: [0x34,0xa5,0x80,0x00]
153 # CHECK: addu $5, $5, $6 # encoding: [0x00,0xa6,0x28,0x21]
154 # There are no further interesting immediates.
156 symbol: # CHECK-LABEL: symbol:
157 .extern extern_sym
158 .option pic0 # CHECK-LABEL: .option pic0
159 dla $5, extern_sym
161 # CHECK: lui $5, %hi(extern_sym) # encoding: [0x3c,0x05,A,A]
162 # CHECK: # fixup A - offset: 0, value: %hi(extern_sym), kind: fixup_Mips_HI16
163 # CHECK: addiu $5, $5, %lo(extern_sym) # encoding: [0x24,0xa5,A,A]
164 # CHECK: # fixup A - offset: 0, value: %lo(extern_sym), kind: fixup_Mips_LO16
166 dla $5, extern_sym($8)
168 # CHECK: lui $5, %hi(extern_sym) # encoding: [0x3c,0x05,A,A]
169 # CHECK: # fixup A - offset: 0, value: %hi(extern_sym), kind: fixup_Mips_HI16
170 # CHECK: addiu $5, $5, %lo(extern_sym) # encoding: [0x24,0xa5,A,A]
171 # CHECK: # fixup A - offset: 0, value: %lo(extern_sym), kind: fixup_Mips_LO16
172 # CHECK: addu $5, $5, $8 # encoding: [0x00,0xa8,0x28,0x21]
174 dla $5, extern_sym($5)
176 # CHECK: lui $1, %hi(extern_sym) # encoding: [0x3c,0x01,A,A]
177 # CHECK: # fixup A - offset: 0, value: %hi(extern_sym), kind: fixup_Mips_HI16
178 # CHECK: addiu $1, $1, %lo(extern_sym) # encoding: [0x24,0x21,A,A]
179 # CHECK: # fixup A - offset: 0, value: %lo(extern_sym), kind: fixup_Mips_LO16
180 # CHECK: addu $5, $1, $5 # encoding: [0x00,0x25,0x28,0x21]
182 dla $5, extern_sym+8
184 # CHECK: lui $5, %hi(extern_sym+8) # encoding: [0x3c,0x05,A,A]
185 # CHECK: # fixup A - offset: 0, value: %hi(extern_sym+8), kind: fixup_Mips_HI16
186 # CHECK: addiu $5, $5, %lo(extern_sym+8) # encoding: [0x24,0xa5,A,A]
187 # CHECK: # fixup A - offset: 0, value: %lo(extern_sym+8), kind: fixup_Mips_LO16
189 dla $5, extern_sym+8($8)
191 # CHECK: lui $5, %hi(extern_sym+8) # encoding: [0x3c,0x05,A,A]
192 # CHECK: # fixup A - offset: 0, value: %hi(extern_sym+8), kind: fixup_Mips_HI16
193 # CHECK: addiu $5, $5, %lo(extern_sym+8) # encoding: [0x24,0xa5,A,A]
194 # CHECK: # fixup A - offset: 0, value: %lo(extern_sym+8), kind: fixup_Mips_LO16
195 # CHECK: addu $5, $5, $8 # encoding: [0x00,0xa8,0x28,0x21]
197 dla $5, extern_sym-8($5)
199 # CHECK: lui $1, %hi(extern_sym-8) # encoding: [0x3c,0x01,A,A]
200 # CHECK: # fixup A - offset: 0, value: %hi(extern_sym-8), kind: fixup_Mips_HI16
201 # CHECK: addiu $1, $1, %lo(extern_sym-8) # encoding: [0x24,0x21,A,A]
202 # CHECK: # fixup A - offset: 0, value: %lo(extern_sym-8), kind: fixup_Mips_LO16
203 # CHECK: addu $5, $1, $5 # encoding: [0x00,0x25,0x28,0x21]
205 dla $5, extern_sym-8
207 # CHECK: lui $5, %hi(extern_sym-8) # encoding: [0x3c,0x05,A,A]
208 # CHECK: # fixup A - offset: 0, value: %hi(extern_sym-8), kind: fixup_Mips_HI16
209 # CHECK: addiu $5, $5, %lo(extern_sym-8) # encoding: [0x24,0xa5,A,A]
210 # CHECK: # fixup A - offset: 0, value: %lo(extern_sym-8), kind: fixup_Mips_LO16
212 dla $5, extern_sym-8($8)
214 # CHECK: lui $5, %hi(extern_sym-8) # encoding: [0x3c,0x05,A,A]
215 # CHECK: # fixup A - offset: 0, value: %hi(extern_sym-8), kind: fixup_Mips_HI16
216 # CHECK: addiu $5, $5, %lo(extern_sym-8) # encoding: [0x24,0xa5,A,A]
217 # CHECK: # fixup A - offset: 0, value: %lo(extern_sym-8), kind: fixup_Mips_LO16
218 # CHECK: addu $5, $5, $8 # encoding: [0x00,0xa8,0x28,0x21]
220 dla $5, extern_sym-8($5)
222 # CHECK: lui $1, %hi(extern_sym-8) # encoding: [0x3c,0x01,A,A]
223 # CHECK: # fixup A - offset: 0, value: %hi(extern_sym-8), kind: fixup_Mips_HI16
224 # CHECK: addiu $1, $1, %lo(extern_sym-8) # encoding: [0x24,0x21,A,A]
225 # CHECK: # fixup A - offset: 0, value: %lo(extern_sym-8), kind: fixup_Mips_LO16
226 # CHECK: addu $5, $1, $5 # encoding: [0x00,0x25,0x28,0x21]
228 .option pic2