1 # RUN: llvm-mc %s -triple=mips64-unknown-linux -show-encoding -mcpu=mips64r2 | \
2 # RUN: FileCheck %s --check-prefix=CHECK-NOTRAP
3 # RUN: llvm-mc %s -triple=mips64-unknown-linux -show-encoding -mcpu=mips64r2 \
4 # RUN: -mattr=+use-tcc-in-div | FileCheck %s --check-prefix=CHECK-TRAP
7 # CHECK-NOTRAP: bne $11, $zero, .Ltmp0 # encoding: [0x15,0x60,A,A]
8 # CHECK-NOTRAP: # fixup A - offset: 0, value: .Ltmp0-4, kind: fixup_Mips_PC16
9 # CHECK-NOTRAP: ddiv $zero, $25, $11 # encoding: [0x03,0x2b,0x00,0x1e]
10 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
11 # CHECK-NOTRAP: .Ltmp0
12 # CHECK-NOTRAP: addiu $1, $zero, -1 # encoding: [0x24,0x01,0xff,0xff]
13 # CHECK-NOTRAP: bne $11, $1, .Ltmp1 # encoding: [0x15,0x61,A,A]
14 # CHECK-NOTRAP: # fixup A - offset: 0, value: .Ltmp1-4, kind: fixup_Mips_PC16
15 # CHECK-NOTRAP: addiu $1, $zero, 1 # encoding: [0x24,0x01,0x00,0x01]
16 # CHECK-NOTRAP: dsll32 $1, $1, 31 # encoding: [0x00,0x01,0x0f,0xfc]
17 # CHECK-NOTRAP: bne $25, $1, .Ltmp1 # encoding: [0x17,0x21,A,A]
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: [0x00,0x06,0x00,0x0d]
21 # CHECK-NOTRAP: .Ltmp1
22 # CHECK-NOTRAP: mflo $25 # encoding: [0x00,0x00,0xc8,0x12]
24 # CHECK-TRAP: teq $11, $zero, 7 # encoding: [0x01,0x60,0x01,0xf4]
25 # CHECK-TRAP: ddiv $zero, $25, $11 # encoding: [0x03,0x2b,0x00,0x1e]
26 # CHECK-TRAP: addiu $1, $zero, -1 # encoding: [0x24,0x01,0xff,0xff]
27 # CHECK-TRAP: bne $11, $1, .Ltmp0 # encoding: [0x15,0x61,A,A]
28 # CHECK-TRAP: # fixup A - offset: 0, value: .Ltmp0-4, kind: fixup_Mips_PC16
29 # CHECK-TRAP: addiu $1, $zero, 1 # encoding: [0x24,0x01,0x00,0x01]
30 # CHECK-TRAP: dsll32 $1, $1, 31 # encoding: [0x00,0x01,0x0f,0xfc]
31 # CHECK-TRAP: teq $25, $1, 6 # encoding: [0x03,0x21,0x01,0xb4]
33 # CHECK-TRAP: mflo $25 # encoding: [0x00,0x00,0xc8,0x12]
36 # CHECK-NOTRAP: bne $12, $zero, .Ltmp2 # encoding: [0x15,0x80,A,A]
37 # CHECK-NOTRAP: # fixup A - offset: 0, value: .Ltmp2-4, kind: fixup_Mips_PC16
38 # CHECK-NOTRAP: ddiv $zero, $24, $12 # encoding: [0x03,0x0c,0x00,0x1e]
39 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
40 # CHECK-NOTRAP: .Ltmp2:
41 # CHECK-NOTRAP: addiu $1, $zero, -1 # encoding: [0x24,0x01,0xff,0xff]
42 # CHECK-NOTRAP: bne $12, $1, .Ltmp3 # encoding: [0x15,0x81,A,A]
43 # CHECK-NOTRAP: # fixup A - offset: 0, value: .Ltmp3-4, kind: fixup_Mips_PC16
44 # CHECK-NOTRAP: addiu $1, $zero, 1 # encoding: [0x24,0x01,0x00,0x01]
45 # CHECK-NOTRAP: dsll32 $1, $1, 31 # encoding: [0x00,0x01,0x0f,0xfc]
46 # CHECK-NOTRAP: bne $24, $1, .Ltmp3 # encoding: [0x17,0x01,A,A]
47 # CHECK-NOTRAP: # fixup A - offset: 0, value: .Ltmp3-4, kind: fixup_Mips_PC16
48 # CHECK-NOTRAP: nop # encoding: [0x00,0x00,0x00,0x00]
49 # CHECK-NOTRAP: break 6 # encoding: [0x00,0x06,0x00,0x0d]
50 # CHECK-NOTRAP: .Ltmp3
51 # CHECK-NOTRAP: mflo $24 # encoding: [0x00,0x00,0xc0,0x12]
53 # CHECK-TRAP: teq $12, $zero, 7 # encoding: [0x01,0x80,0x01,0xf4]
54 # CHECK-TRAP: ddiv $zero, $24, $12 # encoding: [0x03,0x0c,0x00,0x1e]
55 # CHECK-TRAP: addiu $1, $zero, -1 # encoding: [0x24,0x01,0xff,0xff]
56 # CHECK-TRAP: bne $12, $1, .Ltmp1 # encoding: [0x15,0x81,A,A]
57 # CHECK-TRAP: # fixup A - offset: 0, value: .Ltmp1-4, kind: fixup_Mips_PC16
58 # CHECK-TRAP: addiu $1, $zero, 1 # encoding: [0x24,0x01,0x00,0x01]
59 # CHECK-TRAP: dsll32 $1, $1, 31 # encoding: [0x00,0x01,0x0f,0xfc]
60 # CHECK-TRAP: teq $24, $1, 6 # encoding: [0x03,0x01,0x01,0xb4]
62 # CHECK-TRAP: mflo $24 # encoding: [0x00,0x00,0xc0,0x12]
65 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
66 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4]
69 # CHECK-NOTRAP: ddiv $zero, $zero, $9 # encoding: [0x00,0x09,0x00,0x1e]
71 # CHECK-TRAP: teq $9, $zero, 7 # encoding: [0x01,0x20,0x01,0xf4]
72 # CHECK-TRAP: ddiv $zero, $zero, $9 # encoding: [0x00,0x09,0x00,0x1e]
73 # CHECK-TRAP: addiu $1, $zero, -1 # encoding: [0x24,0x01,0xff,0xff]
74 # CHECK-TRAP: bne $9, $1, .Ltmp2 # encoding: [0x15,0x21,A,A]
75 # CHECK-TRAP: # fixup A - offset: 0, value: .Ltmp2-4, kind: fixup_Mips_PC16
76 # CHECK-TRAP: addiu $1, $zero, 1 # encoding: [0x24,0x01,0x00,0x01]
77 # CHECK-TRAP: dsll32 $1, $1, 31 # encoding: [0x00,0x01,0x0f,0xfc]
78 # CHECK-TRAP: teq $zero, $1, 6 # encoding: [0x00,0x01,0x01,0xb4]
80 # CHECK-TRAP: mflo $zero # encoding: [0x00,0x00,0x00,0x12]
83 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
84 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4]
87 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
88 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4]
91 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
92 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4]
95 # CHECK-NOTRAP: move $4, $4 # encoding: [0x00,0x80,0x20,0x25]
96 # CHECK-TRAP: move $4, $4 # encoding: [0x00,0x80,0x20,0x25]
99 # CHECK-NOTRAP: dneg $4, $4 # encoding: [0x00,0x04,0x20,0x2e]
100 # CHECK-TRAP: dneg $4, $4 # encoding: [0x00,0x04,0x20,0x2e]
103 # CHECK-NOTRAP: addiu $1, $zero, 2 # encoding: [0x24,0x01,0x00,0x02]
104 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
105 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
106 # CHECK-TRAP: addiu $1, $zero, 2 # encoding: [0x24,0x01,0x00,0x02]
107 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
108 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
111 # CHECK-NOTRAP: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
112 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
113 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
114 # CHECK-TRAP: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
115 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
116 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
119 # CHECK-NOTRAP: addiu $1, $zero, -32768 # encoding: [0x24,0x01,0x80,0x00]
120 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
121 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
122 # CHECK-TRAP: addiu $1, $zero, -32768 # encoding: [0x24,0x01,0x80,0x00]
123 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
124 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
127 # CHECK-NOTRAP: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
128 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
129 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
130 # CHECK-TRAP: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
131 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
132 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
135 # CHECK-NOTRAP: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
136 # CHECK-NOTRAP: ori $1, $1, 42405 # encoding: [0x34,0x21,0xa5,0xa5]
137 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
138 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
139 # CHECK-TRAP: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
140 # CHECK-TRAP: ori $1, $1, 42405 # encoding: [0x34,0x21,0xa5,0xa5]
141 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
142 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
145 # CHECK-NOTRAP: lui $1, 4095 # encoding: [0x3c,0x01,0x0f,0xff]
146 # CHECK-NOTRAP: ori $1, $1, 65535 # encoding: [0x34,0x21,0xff,0xff]
147 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
148 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
149 # CHECK-TRAP: lui $1, 4095 # encoding: [0x3c,0x01,0x0f,0xff]
150 # CHECK-TRAP: ori $1, $1, 65535 # encoding: [0x34,0x21,0xff,0xff]
151 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
152 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
155 # CHECK-NOTRAP: lui $1, 4096 # encoding: [0x3c,0x01,0x10,0x00]
156 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
157 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
158 # CHECK-TRAP: lui $1, 4096 # encoding: [0x3c,0x01,0x10,0x00]
159 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
160 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
163 # CHECK-NOTRAP: ori $1, $zero, 65535 # encoding: [0x34,0x01,0xff,0xff]
164 # CHECK-NOTRAP: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38]
165 # CHECK-NOTRAP: ori $1, $1, 65534 # encoding: [0x34,0x21,0xff,0xfe]
166 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
167 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
168 # CHECK-TRAP: ori $1, $zero, 65535 # encoding: [0x34,0x01,0xff,0xff]
169 # CHECK-TRAP: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38]
170 # CHECK-TRAP: ori $1, $1, 65534 # encoding: [0x34,0x21,0xff,0xfe]
171 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
172 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
176 # CHECK-NOTRAP: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
177 # CHECK-NOTRAP: dsrl32 $1, $1, 0 # encoding: [0x00,0x01,0x08,0x3e]
178 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
179 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
180 # CHECK-TRAP: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
181 # CHECK-TRAP: dsrl32 $1, $1, 0 # encoding: [0x00,0x01,0x08,0x3e]
182 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
183 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
186 # CHECK-NOTRAP: addiu $1, $zero, 15 # encoding: [0x24,0x01,0x00,0x0f]
187 # CHECK-NOTRAP: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38]
188 # CHECK-NOTRAP: ori $1, $1, 65535 # encoding: [0x34,0x21,0xff,0xff]
189 # CHECK-NOTRAP: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38]
190 # CHECK-NOTRAP: ori $1, $1, 65535 # encoding: [0x34,0x21,0xff,0xff]
191 # CHECK-NOTRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
192 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
193 # CHECK-TRAP: addiu $1, $zero, 15 # encoding: [0x24,0x01,0x00,0x0f]
194 # CHECK-TRAP: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38]
195 # CHECK-TRAP: ori $1, $1, 65535 # encoding: [0x34,0x21,0xff,0xff]
196 # CHECK-TRAP: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38]
197 # CHECK-TRAP: ori $1, $1, 65535 # encoding: [0x34,0x21,0xff,0xff]
198 # CHECK-TRAP: ddiv $zero, $4, $1 # encoding: [0x00,0x81,0x00,0x1e]
199 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
202 # CHECK-NOTRAP: bne $6, $zero, .Ltmp6 # encoding: [0x14,0xc0,A,A]
203 # CHECK-NOTRAP: # fixup A - offset: 0, value: .Ltmp6-4, kind: fixup_Mips_PC16
204 # CHECK-NOTRAP: ddiv $zero, $5, $6 # encoding: [0x00,0xa6,0x00,0x1e]
205 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
206 # CHECK-NOTRAP: .Ltmp6:
207 # CHECK-NOTRAP: addiu $1, $zero, -1 # encoding: [0x24,0x01,0xff,0xff]
208 # CHECK-NOTRAP: bne $6, $1, .Ltmp7 # encoding: [0x14,0xc1,A,A]
209 # CHECK-NOTRAP: # fixup A - offset: 0, value: .Ltmp7-4, kind: fixup_Mips_PC16
210 # CHECK-NOTRAP: addiu $1, $zero, 1 # encoding: [0x24,0x01,0x00,0x01]
211 # CHECK-NOTRAP: dsll32 $1, $1, 31 # encoding: [0x00,0x01,0x0f,0xfc]
212 # CHECK-NOTRAP: bne $5, $1, .Ltmp7 # encoding: [0x14,0xa1,A,A]
213 # CHECK-NOTRAP: # fixup A - offset: 0, value: .Ltmp7-4, kind: fixup_Mips_PC16
214 # CHECK-NOTRAP: nop # encoding: [0x00,0x00,0x00,0x00]
215 # CHECK-NOTRAP: break 6 # encoding: [0x00,0x06,0x00,0x0d]
216 # CHECK-NOTRAP: .Ltmp7:
217 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
219 # CHECK-TRAP: teq $6, $zero, 7 # encoding: [0x00,0xc0,0x01,0xf4]
220 # CHECK-TRAP: ddiv $zero, $5, $6 # encoding: [0x00,0xa6,0x00,0x1e]
221 # CHECK-TRAP: addiu $1, $zero, -1 # encoding: [0x24,0x01,0xff,0xff]
222 # CHECK-TRAP: bne $6, $1, .Ltmp3 # encoding: [0x14,0xc1,A,A]
223 # CHECK-TRAP: # fixup A - offset: 0, value: .Ltmp3-4, kind: fixup_Mips_PC16
224 # CHECK-TRAP: addiu $1, $zero, 1 # encoding: [0x24,0x01,0x00,0x01]
225 # CHECK-TRAP: dsll32 $1, $1, 31 # encoding: [0x00,0x01,0x0f,0xfc]
226 # CHECK-TRAP: teq $5, $1, 6 # encoding: [0x00,0xa1,0x01,0xb4]
227 # CHECK-TRAP: .Ltmp3:
228 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
231 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
232 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4]
235 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
236 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4]
239 # CHECK-NOTRAP: ddiv $zero, $4, $5 # encoding: [0x00,0x85,0x00,0x1e]
240 # CHECK-TRAP: ddiv $zero, $4, $5 # encoding: [0x00,0x85,0x00,0x1e]
243 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
244 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4]
247 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
248 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4]
251 # CHECK-NOTRAP: move $4, $5 # encoding: [0x00,0xa0,0x20,0x25]
252 # CHECK-TRAP: move $4, $5 # encoding: [0x00,0xa0,0x20,0x25]
255 # CHECK-NOTRAP: dneg $4, $5 # encoding: [0x00,0x05,0x20,0x2e]
256 # CHECK-TRAP: dneg $4, $5 # encoding: [0x00,0x05,0x20,0x2e]
259 # CHECK-NOTRAP: addiu $1, $zero, 2 # encoding: [0x24,0x01,0x00,0x02]
260 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
261 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
262 # CHECK-TRAP: addiu $1, $zero, 2 # encoding: [0x24,0x01,0x00,0x02]
263 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
264 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
267 # CHECK-NOTRAP: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
268 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
269 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
270 # CHECK-TRAP: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
271 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
272 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
275 # CHECK-NOTRAP: addiu $1, $zero, -32768 # encoding: [0x24,0x01,0x80,0x00]
276 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
277 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
278 # CHECK-TRAP: addiu $1, $zero, -32768 # encoding: [0x24,0x01,0x80,0x00]
279 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
280 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
283 # CHECK-NOTRAP: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
284 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
285 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
286 # CHECK-TRAP: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
287 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
288 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
291 # CHECK-NOTRAP: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
292 # CHECK-NOTRAP: ori $1, $1, 42405 # encoding: [0x34,0x21,0xa5,0xa5]
293 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
294 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
295 # CHECK-TRAP: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
296 # CHECK-TRAP: ori $1, $1, 42405 # encoding: [0x34,0x21,0xa5,0xa5]
297 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
298 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
301 # CHECK-NOTRAP: lui $1, 4095 # encoding: [0x3c,0x01,0x0f,0xff]
302 # CHECK-NOTRAP: ori $1, $1, 65535 # encoding: [0x34,0x21,0xff,0xff]
303 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
304 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
305 # CHECK-TRAP: lui $1, 4095 # encoding: [0x3c,0x01,0x0f,0xff]
306 # CHECK-TRAP: ori $1, $1, 65535 # encoding: [0x34,0x21,0xff,0xff]
307 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
308 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
310 ddiv $
4,$
5,0x10000000
311 # CHECK-NOTRAP: lui $1, 4096 # encoding: [0x3c,0x01,0x10,0x00]
312 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
313 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
314 # CHECK-TRAP: lui $1, 4096 # encoding: [0x3c,0x01,0x10,0x00]
315 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
316 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
318 ddiv $
4,$
5,0xfffffffe
319 # CHECK-NOTRAP: ori $1, $zero, 65535 # encoding: [0x34,0x01,0xff,0xff]
320 # CHECK-NOTRAP: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38]
321 # CHECK-NOTRAP: ori $1, $1, 65534 # encoding: [0x34,0x21,0xff,0xfe]
322 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
323 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
324 # CHECK-TRAP: ori $1, $zero, 65535 # encoding: [0x34,0x01,0xff,0xff]
325 # CHECK-TRAP: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38]
326 # CHECK-TRAP: ori $1, $1, 65534 # encoding: [0x34,0x21,0xff,0xfe]
327 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
328 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
330 ddiv $
4,$
5,0xffffffff
331 # CHECK-NOTRAP: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
332 # CHECK-NOTRAP: dsrl32 $1, $1, 0 # encoding: [0x00,0x01,0x08,0x3e]
333 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
334 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
335 # CHECK-TRAP: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff]
336 # CHECK-TRAP: dsrl32 $1, $1, 0 # encoding: [0x00,0x01,0x08,0x3e]
337 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
338 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
340 ddiv $
4,$
5,0xfffffffff
341 # CHECK-NOTRAP: addiu $1, $zero, 15 # encoding: [0x24,0x01,0x00,0x0f]
342 # CHECK-NOTRAP: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38]
343 # CHECK-NOTRAP: ori $1, $1, 65535 # encoding: [0x34,0x21,0xff,0xff]
344 # CHECK-NOTRAP: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38]
345 # CHECK-NOTRAP: ori $1, $1, 65535 # encoding: [0x34,0x21,0xff,0xff]
346 # CHECK-NOTRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
347 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
348 # CHECK-TRAP: addiu $1, $zero, 15 # encoding: [0x24,0x01,0x00,0x0f]
349 # CHECK-TRAP: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38]
350 # CHECK-TRAP: ori $1, $1, 65535 # encoding: [0x34,0x21,0xff,0xff]
351 # CHECK-TRAP: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38]
352 # CHECK-TRAP: ori $1, $1, 65535 # encoding: [0x34,0x21,0xff,0xff]
353 # CHECK-TRAP: ddiv $zero, $5, $1 # encoding: [0x00,0xa1,0x00,0x1e]
354 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]