1 # RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips32r2 | \
2 # RUN: FileCheck %s --check-prefix=CHECK-NOTRAP
3 # RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips32r2 \
4 # RUN: -mattr=+use-tcc-in-div | FileCheck %s --check-prefix=CHECK-TRAP
7 # CHECK-NOTRAP: bnez $11, $tmp0 # encoding: [0x15,0x60,A,A]
8 # CHECK-NOTRAP: # fixup A - offset: 0, value: ($tmp0)-4, kind: fixup_Mips_PC16
9 # CHECK-NOTRAP: divu $zero, $25, $11 # encoding: [0x03,0x2b,0x00,0x1b]
10 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
11 # CHECK-NOTRAP: $tmp0:
12 # CHECK-NOTRAP: mflo $25 # encoding: [0x00,0x00,0xc8,0x12]
15 # CHECK-NOTRAP: bnez $12, $tmp1 # encoding: [0x15,0x80,A,A]
16 # CHECK-NOTRAP: # fixup A - offset: 0, value: ($tmp1)-4, kind: fixup_Mips_PC16
17 # CHECK-NOTRAP: divu $zero, $24, $12 # encoding: [0x03,0x0c,0x00,0x1b]
18 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
19 # CHECK-NOTRAP: $tmp1:
20 # CHECK-NOTRAP: mflo $24 # encoding: [0x00,0x00,0xc0,0x12]
23 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
26 # CHECK-NOTRAP: divu $zero, $zero, $9 # encoding: [0x00,0x09,0x00,0x1b]
29 # CHECK-NOTRAP: divu $zero, $zero, $zero # encoding: [0x00,0x00,0x00,0x1b]
32 # CHECK-NOTRAP: bnez $6, $tmp2 # encoding: [0x14,0xc0,A,A]
33 # CHECK-NOTRAP: # fixup A - offset: 0, value: ($tmp2)-4, kind: fixup_Mips_PC16
34 # CHECK-NOTRAP: divu $zero, $5, $6 # encoding: [0x00,0xa6,0x00,0x1b]
35 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
36 # CHECK-NOTRAP: $tmp2:
37 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
40 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
43 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d]
46 # CHECK-NOTRAP: divu $zero, $4, $5 # encoding: [0x00,0x85,0x00,0x1b]
49 # CHECK-TRAP: teq $11, $zero, 7 # encoding: [0x01,0x60,0x01,0xf4]
50 # CHECK-TRAP: divu $zero, $25, $11 # encoding: [0x03,0x2b,0x00,0x1b]
51 # CHECK-TRAP: mflo $25 # encoding: [0x00,0x00,0xc8,0x12]
54 # CHECK-TRAP: teq $12, $zero, 7 # encoding: [0x01,0x80,0x01,0xf4]
55 # CHECK-TRAP: divu $zero, $24, $12 # encoding: [0x03,0x0c,0x00,0x1b]
56 # CHECK-TRAP: mflo $24 # encoding: [0x00,0x00,0xc0,0x12]
59 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4]
62 # CHECK-TRAP: divu $zero, $zero, $9 # encoding: [0x00,0x09,0x00,0x1b]
65 # CHECK-TRAP: divu $zero, $zero, $zero # encoding: [0x00,0x00,0x00,0x1b]
68 # CHECK-TRAP: teq $6, $zero, 7 # encoding: [0x00,0xc0,0x01,0xf4]
69 # CHECK-TRAP: divu $zero, $5, $6 # encoding: [0x00,0xa6,0x00,0x1b]
70 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
73 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4]
76 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4]
77 # CHECK-TRAP: divu $zero, $zero, $zero # encoding: [0x00,0x00,0x00,0x1b]
78 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
81 # CHECK-TRAP: divu $zero, $4, $5 # encoding: [0x00,0x85,0x00,0x1b]