1 # RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips64r2 | \ 2 # RUN: FileCheck %s --check-prefix=CHECK-NOTRAP 3 # RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips64r2 \ 4 # RUN: -mattr=+use-tcc-in-div | FileCheck %s --check-prefix=CHECK-TRAP 5 6 ddivu $25,$11 7 # CHECK-NOTRAP: bne $11, $zero, 8 # encoding: [0x15,0x60,0x00,0x02] 8 # CHECK-NOTRAP: ddivu $zero, $25, $11 # encoding: [0x03,0x2b,0x00,0x1f] 9 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d] 10 # CHECK-NOTRAP: mflo $25 # encoding: [0x00,0x00,0xc8,0x12] 11 12 ddivu $24,$12 13 # CHECK-NOTRAP: bne $12, $zero, 8 # encoding: [0x15,0x80,0x00,0x02] 14 # CHECK-NOTRAP: ddivu $zero, $24, $12 # encoding: [0x03,0x0c,0x00,0x1f] 15 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d] 16 # CHECK-NOTRAP: mflo $24 # encoding: [0x00,0x00,0xc0,0x12] 17 18 ddivu $25,$0 19 # CHECK-NOTRAP: bne $zero, $zero, 8 # encoding: [0x14,0x00,0x00,0x02] 20 # CHECK-NOTRAP: ddivu $zero, $25, $zero # encoding: [0x03,0x20,0x00,0x1f] 21 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d] 22 # CHECK-NOTRAP: mflo $25 # encoding: [0x00,0x00,0xc8,0x12] 23 24 ddivu $0,$9 25 # CHECK-NOTRAP: bne $9, $zero, 8 # encoding: [0x15,0x20,0x00,0x02] 26 # CHECK-NOTRAP: ddivu $zero, $zero, $9 # encoding: [0x00,0x09,0x00,0x1f] 27 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d] 28 # CHECK-NOTRAP: mflo $zero # encoding: [0x00,0x00,0x00,0x12] 29 30 ddivu $0,$0 31 # CHECK-NOTRAP: bne $zero, $zero, 8 # encoding: [0x14,0x00,0x00,0x02] 32 # CHECK-NOTRAP: ddivu $zero, $zero, $zero # encoding: [0x00,0x00,0x00,0x1f] 33 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d] 34 # CHECK-NOTRAP: mflo $zero # encoding: [0x00,0x00,0x00,0x12] 35 36 ddivu $4,$5,$6 37 # CHECK-NOTRAP: bne $6, $zero, 8 # encoding: [0x14,0xc0,0x00,0x02] 38 # CHECK-NOTRAP: ddivu $zero, $5, $6 # encoding: [0x00,0xa6,0x00,0x1f] 39 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d] 40 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12] 41 42 ddivu $4,$5,$0 43 # CHECK-NOTRAP: bne $zero, $zero, 8 # encoding: [0x14,0x00,0x00,0x02] 44 # CHECK-NOTRAP: ddivu $zero, $5, $zero # encoding: [0x00,0xa0,0x00,0x1f] 45 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d] 46 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12] 47 48 ddivu $4,$0,$0 49 # CHECK-NOTRAP: bne $zero, $zero, 8 # encoding: [0x14,0x00,0x00,0x02] 50 # CHECK-NOTRAP: ddivu $zero, $zero, $zero # encoding: [0x00,0x00,0x00,0x1f] 51 # CHECK-NOTRAP: break 7 # encoding: [0x00,0x07,0x00,0x0d] 52 # CHECK-NOTRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12] 53 54 ddivu $0, $4, $5 55 # CHECK-NOTRAP: ddivu $zero, $4, $5 # encoding: [0x00,0x85,0x00,0x1f] 56 57 ddivu $25, $11 58 # CHECK-TRAP: teq $11, $zero, 7 # encoding: [0x01,0x60,0x01,0xf4] 59 # CHECK-TRAP: ddivu $zero, $25, $11 # encoding: [0x03,0x2b,0x00,0x1f] 60 # CHECK-TRAP: mflo $25 # encoding: [0x00,0x00,0xc8,0x12] 61 62 ddivu $24,$12 63 # CHECK-TRAP: teq $12, $zero, 7 # encoding: [0x01,0x80,0x01,0xf4] 64 # CHECK-TRAP: ddivu $zero, $24, $12 # encoding: [0x03,0x0c,0x00,0x1f] 65 # CHECK-TRAP: mflo $24 # encoding: [0x00,0x00,0xc0,0x12] 66 67 ddivu $25,$0 68 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4] 69 # CHECK-TRAP: ddivu $zero, $25, $zero # encoding: [0x03,0x20,0x00,0x1f] 70 # CHECK-TRAP: mflo $25 # encoding: [0x00,0x00,0xc8,0x12] 71 72 ddivu $0,$9 73 # CHECK-TRAP: teq $9, $zero, 7 # encoding: [0x01,0x20,0x01,0xf4] 74 # CHECK-TRAP: ddivu $zero, $zero, $9 # encoding: [0x00,0x09,0x00,0x1f] 75 # CHECK-TRAP: mflo $zero # encoding: [0x00,0x00,0x00,0x12] 76 77 ddivu $0,$0 78 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4] 79 # CHECK-TRAP: ddivu $zero, $zero, $zero # encoding: [0x00,0x00,0x00,0x1f] 80 # CHECK-TRAP: mflo $zero # encoding: [0x00,0x00,0x00,0x12] 81 82 ddivu $4,$5,$6 83 # CHECK-TRAP: teq $6, $zero, 7 # encoding: [0x00,0xc0,0x01,0xf4] 84 # CHECK-TRAP: ddivu $zero, $5, $6 # encoding: [0x00,0xa6,0x00,0x1f] 85 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12] 86 87 ddivu $4,$5,$0 88 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4] 89 # CHECK-TRAP: ddivu $zero, $5, $zero # encoding: [0x00,0xa0,0x00,0x1f] 90 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12] 91 92 ddivu $4,$0,$0 93 # CHECK-TRAP: teq $zero, $zero, 7 # encoding: [0x00,0x00,0x01,0xf4] 94 # CHECK-TRAP: ddivu $zero, $zero, $zero # encoding: [0x00,0x00,0x00,0x1f] 95 # CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12] 96 97 ddivu $0, $4, $5 98 # CHECK-TRAP: ddivu $zero, $4, $5 # encoding: [0x00,0x85,0x00,0x1f] 99