[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / Mips / macro-drem.s
blob03bdd24c27d231ffd277dfa6c5069196faa440af
1 # RUN: llvm-mc %s -triple=mips64el-unknown-linux -show-encoding -mcpu=mips64 | \
2 # RUN: FileCheck %s --check-prefix=CHECK-NOTRAP
3 # RUN: llvm-mc %s -triple=mips64el-unknown-linux -show-encoding -mcpu=mips64 \
4 # RUN: -mattr=+use-tcc-in-div | FileCheck %s --check-prefix=CHECK-TRAP
6 drem $4,$5
7 # CHECK-NOTRAP: bne $5, $zero, .Ltmp0 # encoding: [A,A,0xa0,0x14]
8 # CHECK-NOTRAP: # fixup A - offset: 0, value: .Ltmp0-4, kind: fixup_Mips_PC16
9 # CHECK-NOTRAP: ddiv $zero, $4, $5 # encoding: [0x1e,0x00,0x85,0x00]
10 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
11 # CHECK-NOTRAP: .Ltmp0
12 # CHECK-NOTRAP: addiu $1, $zero, -1 # encoding: [0xff,0xff,0x01,0x24]
13 # CHECK-NOTRAP: bne $5, $1, .Ltmp1 # encoding: [A,A,0xa1,0x14]
14 # CHECK-NOTRAP: # fixup A - offset: 0, value: .Ltmp1-4, kind: fixup_Mips_PC16
15 # CHECK-NOTRAP: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24]
16 # CHECK-NOTRAP: dsll32 $1, $1, 31 # encoding: [0xfc,0x0f,0x01,0x00]
17 # CHECK-NOTRAP: bne $4, $1, .Ltmp1 # encoding: [A,A,0x81,0x14]
18 # CHECK-NOTRAP: # fixup A - offset: 0, value: .Ltmp1-4, kind: fixup_Mips_PC16
19 # CHECK-NOTRAP: nop # encoding: [0x00,0x00,0x00,0x00]
20 # CHECK-NOTRAP: break 6 # encoding: [0x0d,0x00,0x06,0x00]
21 # CHECK-NOTRAP: .Ltmp1
22 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
24 drem $4,$0
25 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
27 drem $4,0
28 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
30 drem $0,0
31 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
33 drem $4,1
34 # CHECK-NOTRAP: or $4, $zero, $zero # encoding: [0x25,0x20,0x00,0x00]
36 drem $4,-1
37 # CHECK-NOTRAP: or $4, $zero, $zero # encoding: [0x25,0x20,0x00,0x00]
39 drem $4,2
40 # CHECK-NOTRAP: addiu $1, $zero, 2 # encoding: [0x02,0x00,0x01,0x24]
41 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x1e,0x00,0x81,0x00]
42 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
44 drem $4,0x10000
45 # CHECK-NOTRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
46 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x1e,0x00,0x81,0x00]
47 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
49 drem $4,0x1a5a5
50 # CHECK-NOTRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
51 # CHECK-NOTRAP: ori $1, $1, 42405 # encoding: [0xa5,0xa5,0x21,0x34]
52 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x1e,0x00,0x81,0x00]
53 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
55 drem $4,0x8000
56 # CHECK-NOTRAP: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
57 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x1e,0x00,0x81,0x00]
58 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
60 drem $4,-0x8000
61 # CHECK-NOTRAP: addiu $1, $zero, -32768 # encoding: [0x00,0x80,0x01,0x24]
62 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x1e,0x00,0x81,0x00]
63 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
65 drem $4,$5,$6
66 # CHECK-NOTRAP: bne $6, $zero, .Ltmp2 # encoding: [A,A,0xc0,0x14]
67 # CHECK-NOTRAP: # fixup A - offset: 0, value: .Ltmp2-4, kind: fixup_Mips_PC16
68 # CHECK-NOTRAP: ddiv $zero, $5, $6 # encoding: [0x1e,0x00,0xa6,0x00]
69 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
70 # CHECK-NOTRAP: .Ltmp2:
71 # CHECK-NOTRAP: addiu $1, $zero, -1 # encoding: [0xff,0xff,0x01,0x24]
72 # CHECK-NOTRAP: bne $6, $1, .Ltmp3 # encoding: [A,A,0xc1,0x14]
73 # CHECK-NOTRAP: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24]
74 # CHECK-NOTRAP: dsll32 $1, $1, 31 # encoding: [0xfc,0x0f,0x01,0x00]
75 # CHECK-NOTRAP: bne $5, $1, .Ltmp3 # encoding: [A,A,0xa1,0x14]
76 # CHECK-NOTRAP: nop # encoding: [0x00,0x00,0x00,0x00]
77 # CHECK-NOTRAP: break 6 # encoding: [0x0d,0x00,0x06,0x00]
78 # CHECK-NOTRAP: .Ltmp3:
79 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
81 drem $4,$5,$0
82 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
84 drem $4,$0,$0
85 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
87 drem $0,$5,$4
88 # CHECK-NOTRAP: ddiv $zero, $5, $4 # encoding: [0x1e,0x00,0xa4,0x00]
90 drem $4,$5,0
91 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
93 drem $4,$0,0
94 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
96 drem $0,$4,$5
97 # CHECK-NOTRAP: ddiv $zero, $4, $5 # encoding: [0x1e,0x00,0x85,0x00]
99 drem $4,$5,1
100 # CHECK-NOTRAP: or $4, $zero, $zero # encoding: [0x25,0x20,0x00,0x00]
102 drem $4,$5,-1
103 # CHECK-NOTRAP: or $4, $zero, $zero # encoding: [0x25,0x20,0x00,0x00]
105 drem $4,$5,2
106 # CHECK-NOTRAP: addiu $1, $zero, 2 # encoding: [0x02,0x00,0x01,0x24]
107 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x1e,0x00,0xa1,0x00]
108 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
110 drem $4,$5,0x10000
111 # CHECK-NOTRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
112 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x1e,0x00,0xa1,0x00]
113 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
115 drem $4,$5,0x1a5a5
116 # CHECK-NOTRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
117 # CHECK-NOTRAP: ori $1, $1, 42405 # encoding: [0xa5,0xa5,0x21,0x34]
118 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x1e,0x00,0xa1,0x00]
119 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
121 drem $4,$5,0x8000
122 # CHECK-NOTRAP: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
123 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x1e,0x00,0xa1,0x00]
124 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
126 drem $4,$5,-0x8000
127 # CHECK-NOTRAP: addiu $1, $zero, -32768 # encoding: [0x00,0x80,0x01,0x24]
128 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x1e,0x00,0xa1,0x00]
129 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
131 drem $4,$5
132 # CHECK-TRAP: teq $5, $zero, 7 # encoding: [0xf4,0x01,0xa0,0x00]
133 # CHECK-TRAP: ddiv $zero, $4, $5 # encoding: [0x1e,0x00,0x85,0x00]
134 # CHECK-TRAP: addiu $1, $zero, -1 # encoding: [0xff,0xff,0x01,0x24]
135 # CHECK-TRAP: bne $5, $1, .Ltmp2 # encoding: [A,A,0xa1,0x14]
136 # CHECK-TRAP: # fixup A - offset: 0, value: .Ltmp2-4, kind: fixup_Mips_PC16
137 # CHECK-TRAP: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24]
138 # CHECK-TRAP: dsll32 $1, $1, 31 # encoding: [0xfc,0x0f,0x01,0x00]
139 # CHECK-TRAP: teq $4, $1, 6 # encoding: [0xb4,0x01,0x81,0x00]
140 # CHECK-TRAP: .Ltmp2
141 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
143 drem $4,$0
144 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
146 drem $4,0
147 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
149 drem $0,0
150 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
152 drem $4,1
153 # CHECK-TRAP: or $4, $zero, $zero # encoding: [0x25,0x20,0x00,0x00]
155 drem $4,-1
156 # CHECK-TRAP: or $4, $zero, $zero # encoding: [0x25,0x20,0x00,0x00]
158 drem $4,2
159 # CHECK-TRAP: addiu $1, $zero, 2 # encoding: [0x02,0x00,0x01,0x24]
160 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x1e,0x00,0x81,0x00]
161 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
163 drem $4,0x10000
164 # CHECK-TRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
165 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x1e,0x00,0x81,0x00]
166 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
168 drem $4,0x1a5a5
169 # CHECK-TRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
170 # CHECK-TRAP: ori $1, $1, 42405 # encoding: [0xa5,0xa5,0x21,0x34]
171 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x1e,0x00,0x81,0x00]
172 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
174 drem $4,0x8000
175 # CHECK-TRAP: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
176 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x1e,0x00,0x81,0x00]
177 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
179 drem $4,-0x8000
180 # CHECK-TRAP: addiu $1, $zero, -32768 # encoding: [0x00,0x80,0x01,0x24]
181 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x1e,0x00,0x81,0x00]
182 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
184 drem $4,$5,$6
185 # CHECK-TRAP: teq $6, $zero, 7 # encoding: [0xf4,0x01,0xc0,0x00]
186 # CHECK-TRAP: ddiv $zero, $5, $6 # encoding: [0x1e,0x00,0xa6,0x00]
187 # CHECK-TRAP: addiu $1, $zero, -1 # encoding: [0xff,0xff,0x01,0x24]
188 # CHECK-TRAP: bne $6, $1, .Ltmp3 # encoding: [A,A,0xc1,0x14]
189 # CHECK-TRAP; # fixup A - offset: 0, value: .Ltmp3-4, kind: fixup_Mips_PC16
190 # CHECK-TRAP: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24]
191 # CHECK-TRAP: dsll32 $1, $1, 31 # encoding: [0xfc,0x0f,0x01,0x00]
192 # CHECK-TRAP: teq $5, $1, 6 # encoding: [0xb4,0x01,0xa1,0x00]
193 # CHECK-TRAP: .Ltmp3
194 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
196 drem $4,$5,$0
197 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
199 drem $4,$0,$0
200 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
202 drem $0,$5,$4
203 # CHECK-TRAP: ddiv $zero, $5, $4 # encoding: [0x1e,0x00,0xa4,0x00]
205 drem $4,$5,0
206 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
208 drem $4,$0,0
209 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
211 drem $0,$4,$5
212 # CHECK-TRAP: ddiv $zero, $4, $5 # encoding: [0x1e,0x00,0x85,0x00]
214 drem $4,$5,1
215 # CHECK-TRAP: or $4, $zero, $zero # encoding: [0x25,0x20,0x00,0x00]
217 drem $4,$5,-1
218 # CHECK-TRAP: or $4, $zero, $zero # encoding: [0x25,0x20,0x00,0x00]
220 drem $4,$5,2
221 # CHECK-TRAP: addiu $1, $zero, 2 # encoding: [0x02,0x00,0x01,0x24]
222 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x1e,0x00,0xa1,0x00]
223 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
225 drem $4,$5,0x10000
226 # CHECK-TRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
227 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x1e,0x00,0xa1,0x00]
228 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
230 drem $4,$5,0x1a5a5
231 # CHECK-TRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
232 # CHECK-TRAP: ori $1, $1, 42405 # encoding: [0xa5,0xa5,0x21,0x34]
233 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x1e,0x00,0xa1,0x00]
234 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
236 drem $4,$5,0x8000
237 # CHECK-TRAP: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
238 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x1e,0x00,0xa1,0x00]
239 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
241 drem $4,$5,-0x8000
242 # CHECK-TRAP: addiu $1, $zero, -32768 # encoding: [0x00,0x80,0x01,0x24]
243 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x1e,0x00,0xa1,0x00]
244 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]