1 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32 | \
2 # RUN: FileCheck %s --check-prefix=CHECK-NOTRAP
3 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32 \
4 # RUN: -mattr=+use-tcc-in-div | FileCheck %s --check-prefix=CHECK-TRAP
7 # CHECK-NOTRAP: bnez $5, $tmp0 # encoding: [A,A,0xa0,0x14]
8 # CHECK-NOTRAP: # fixup A - offset: 0, value: ($tmp0)-4, kind: fixup_Mips_PC16
9 # CHECK-NOTRAP: div $zero, $4, $5 # encoding: [0x1a,0x00,0x85,0x00]
10 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
12 # CHECK-NOTRAP: addiu $1, $zero, -1 # encoding: [0xff,0xff,0x01,0x24]
13 # CHECK-NOTRAP: bne $5, $1, $tmp1 # encoding: [A,A,0xa1,0x14]
14 # CHECK-NOTRAP: # fixup A - offset: 0, value: ($tmp1)-4, kind: fixup_Mips_PC16
15 # CHECK-NOTRAP: lui $1, 32768 # encoding: [0x00,0x80,0x01,0x3c]
16 # CHECK-NOTRAP: bne $4, $1, $tmp1 # encoding: [A,A,0x81,0x14]
17 # CHECK-NOTRAP: # fixup A - offset: 0, value: ($tmp1)-4, kind: fixup_Mips_PC16
18 # CHECK-NOTRAP: nop # encoding: [0x00,0x00,0x00,0x00]
19 # CHECK-NOTRAP: break 6 # encoding: [0x0d,0x00,0x06,0x00]
21 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
23 # CHECK-TRAP: teq $5, $zero, 7 # encoding: [0xf4,0x01,0xa0,0x00]
24 # CHECK-TRAP: div $zero, $4, $5 # encoding: [0x1a,0x00,0x85,0x00]
25 # CHECK-TRAP: addiu $1, $zero, -1 # encoding: [0xff,0xff,0x01,0x24]
26 # CHECK-TRAP: bne $5, $1, $tmp0 # encoding: [A,A,0xa1,0x14]
27 # CHECK-TRAP: lui $1, 32768 # encoding: [0x00,0x80,0x01,0x3c]
28 # CHECK-TRAP: teq $4, $1, 6 # encoding: [0xb4,0x01,0x81,0x00]
30 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
33 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
34 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
37 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
38 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
41 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
42 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
45 # CHECK-NOTRAP: move $4, $zero # encoding: [0x25,0x20,0x00,0x00]
46 # CHECK-TRAP: move $4, $zero # encoding: [0x25,0x20,0x00,0x00]
49 # CHECK-NOTRAP: move $4, $zero # encoding: [0x25,0x20,0x00,0x00]
50 # CHECK-TRAP: move $4, $zero # encoding: [0x25,0x20,0x00,0x00]
53 # CHECK-NOTRAP: addiu $1, $zero, 2 # encoding: [0x02,0x00,0x01,0x24]
54 # CHECK-NOTRAP: div $zero, $4, $1 # encoding: [0x1a,0x00,0x81,0x00]
55 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
56 # CHECK-TRAP: addiu $1, $zero, 2 # encoding: [0x02,0x00,0x01,0x24]
57 # CHECK-TRAP: div $zero, $4, $1 # encoding: [0x1a,0x00,0x81,0x00]
58 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
61 # CHECK-NOTRAP: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
62 # CHECK-NOTRAP: div $zero, $4, $1 # encoding: [0x1a,0x00,0x81,0x00]
63 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
64 # CHECK-TRAP: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
65 # CHECK-TRAP: div $zero, $4, $1 # encoding: [0x1a,0x00,0x81,0x00]
66 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
69 # CHECK-NOTRAP: addiu $1, $zero, -32768 # encoding: [0x00,0x80,0x01,0x24]
70 # CHECK-NOTRAP: div $zero, $4, $1 # encoding: [0x1a,0x00,0x81,0x00]
71 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
72 # CHECK-TRAP: addiu $1, $zero, -32768 # encoding: [0x00,0x80,0x01,0x24]
73 # CHECK-TRAP: div $zero, $4, $1 # encoding: [0x1a,0x00,0x81,0x00]
74 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
77 # CHECK-NOTRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
78 # CHECK-NOTRAP: div $zero, $4, $1 # encoding: [0x1a,0x00,0x81,0x00]
79 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
80 # CHECK-TRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
81 # CHECK-TRAP: div $zero, $4, $1 # encoding: [0x1a,0x00,0x81,0x00]
82 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
85 # CHECK-NOTRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
86 # CHECK-NOTRAP: ori $1, $1, 42405 # encoding: [0xa5,0xa5,0x21,0x34]
87 # CHECK-NOTRAP: div $zero, $4, $1 # encoding: [0x1a,0x00,0x81,0x00]
88 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
89 # CHECK-TRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
90 # CHECK-TRAP: ori $1, $1, 42405 # encoding: [0xa5,0xa5,0x21,0x34]
91 # CHECK-TRAP: div $zero, $4, $1 # encoding: [0x1a,0x00,0x81,0x00]
92 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
95 # CHECK-NOTRAP: bnez $6, $tmp2 # encoding: [A,A,0xc0,0x14]
96 # CHECK-NOTRAP: div $zero, $5, $6 # encoding: [0x1a,0x00,0xa6,0x00]
97 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
99 # CHECK-NOTRAP: addiu $1, $zero, -1 # encoding: [0xff,0xff,0x01,0x24]
100 # CHECK-NOTRAP: bne $6, $1, $tmp3 # encoding: [A,A,0xc1,0x14]
101 # CHECK-NOTRAP: lui $1, 32768 # encoding: [0x00,0x80,0x01,0x3c]
102 # CHECK-NOTRAP: bne $5, $1, $tmp3 # encoding: [A,A,0xa1,0x14]
103 # CHECK-NOTRAP: nop # encoding: [0x00,0x00,0x00,0x00]
104 # CHECK-NOTRAP: break 6 # encoding: [0x0d,0x00,0x06,0x00]
105 # CHECK-NOTRAP: $tmp3
106 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
107 # CHECK-TRAP: teq $6, $zero, 7 # encoding: [0xf4,0x01,0xc0,0x00]
108 # CHECK-TRAP: div $zero, $5, $6 # encoding: [0x1a,0x00,0xa6,0x00]
109 # CHECK-TRAP: addiu $1, $zero, -1 # encoding: [0xff,0xff,0x01,0x24]
110 # CHECK-TRAP: bne $6, $1, $tmp1 # encoding: [A,A,0xc1,0x14]
111 # CHECK-TRAP: lui $1, 32768 # encoding: [0x00,0x80,0x01,0x3c]
112 # CHECK-TRAP: teq $5, $1, 6 # encoding: [0xb4,0x01,0xa1,0x00]
114 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
117 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
118 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
121 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
122 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
125 # CHECK-NOTRAP: div $zero, $5, $4 # encoding: [0x1a,0x00,0xa4,0x00]
126 # CHECK-TRAP: div $zero, $5, $4 # encoding: [0x1a,0x00,0xa4,0x00]
129 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
130 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
133 # CHECK-NOTRAP: break 7 # encoding: [0x0d,0x00,0x07,0x00]
134 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0xf4,0x01,0x00,0x00]
137 # CHECK-NOTRAP: move $4, $zero # encoding: [0x25,0x20,0x00,0x00]
138 # CHECK-TRAP: move $4, $zero # encoding: [0x25,0x20,0x00,0x00]
141 # CHECK-NOTRAP: move $4, $zero # encoding: [0x25,0x20,0x00,0x00]
142 # CHECK-TRAP: move $4, $zero # encoding: [0x25,0x20,0x00,0x00]
145 # CHECK-NOTRAP: addiu $1, $zero, 2 # encoding: [0x02,0x00,0x01,0x24]
146 # CHECK-NOTRAP: div $zero, $5, $1 # encoding: [0x1a,0x00,0xa1,0x00]
147 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
148 # CHECK-TRAP: addiu $1, $zero, 2 # encoding: [0x02,0x00,0x01,0x24]
149 # CHECK-TRAP: div $zero, $5, $1 # encoding: [0x1a,0x00,0xa1,0x00]
150 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
153 # CHECK-NOTRAP: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
154 # CHECK-NOTRAP: div $zero, $5, $1 # encoding: [0x1a,0x00,0xa1,0x00]
155 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
156 # CHECK-TRAP: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34]
157 # CHECK-TRAP: div $zero, $5, $1 # encoding: [0x1a,0x00,0xa1,0x00]
158 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
162 # CHECK-NOTRAP: addiu $1, $zero, -32768 # encoding: [0x00,0x80,0x01,0x24]
163 # CHECK-NOTRAP: div $zero, $5, $1 # encoding: [0x1a,0x00,0xa1,0x00]
164 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
165 # CHECK-TRAP: addiu $1, $zero, -32768 # encoding: [0x00,0x80,0x01,0x24]
166 # CHECK-TRAP: div $zero, $5, $1 # encoding: [0x1a,0x00,0xa1,0x00]
167 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
171 # CHECK-NOTRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
172 # CHECK-NOTRAP: div $zero, $5, $1 # encoding: [0x1a,0x00,0xa1,0x00]
173 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
174 # CHECK-TRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
175 # CHECK-TRAP: div $zero, $5, $1 # encoding: [0x1a,0x00,0xa1,0x00]
176 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
180 # CHECK-NOTRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
181 # CHECK-NOTRAP: ori $1, $1, 42405 # encoding: [0xa5,0xa5,0x21,0x34]
182 # CHECK-NOTRAP: div $zero, $5, $1 # encoding: [0x1a,0x00,0xa1,0x00]
183 # CHECK-NOTRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]
184 # CHECK-TRAP: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c]
185 # CHECK-TRAP: ori $1, $1, 42405 # encoding: [0xa5,0xa5,0x21,0x34]
186 # CHECK-TRAP: div $zero, $5, $1 # encoding: [0x1a,0x00,0xa1,0x00]
187 # CHECK-TRAP: mfhi $4 # encoding: [0x10,0x20,0x00,0x00]