1# RUN: llvm-mc --disassemble %s -triple=mips-unknown-linux -mcpu=mips32r6 | FileCheck %s
20x00 0x00 0x00 0x0e # CHECK: sdbbp
30x00 0x00 0x00 0x0f # CHECK: sync
40x00 0x00 0x00 0x40 # CHECK: ssnop
50x00 0x00 0x00 0x4f # CHECK: sync 1
60x00 0x00 0x08 0x8e # CHECK: sdbbp 34
70x00 0x03 0x00 0x34 # CHECK: teq $zero, $3
80x00 0x53 0x21 0x72 # CHECK: tlt $2, $19, 133
90x00 0x64 0x10 0x35 # CHECK: seleqz $2, $3, $4
100x00 0x64 0x10 0x37 # CHECK: selnez $2, $3, $4
110x00 0x64 0x10 0x98 # CHECK: mul $2, $3, $4
120x00 0x64 0x10 0x99 # CHECK: mulu $2, $3, $4
130x00 0x64 0x10 0x9a # CHECK: div $2, $3, $4
140x00 0x64 0x10 0x9b # CHECK: divu $2, $3, $4
150x00 0x64 0x10 0xc5 # CHECK: lsa $2, $3, $4, 4
160x00 0x64 0x10 0xd8 # CHECK: muh $2, $3, $4
170x00 0x64 0x10 0xd9 # CHECK: muhu $2, $3, $4
180x00 0x64 0x10 0xda # CHECK: mod $2, $3, $4
190x00 0x64 0x10 0xdb # CHECK: modu $2, $3, $4
200x00 0x80 0x04 0x09 # CHECK: jr.hb $4
210xd8 0x1b 0x00 0x00 # CHECK: jrc $27
220x00 0x80 0xfc 0x09 # CHECK: jalr.hb $4
230x00 0xa0 0x24 0x09 # CHECK: jalr.hb $4, $5
240xf8 0x19 0x00 0x00 # CHECK: jalrc $25
250x00 0xa0 0x58 0x51 # CHECK: clo $11, $5
260x00 0xa7 0x9b 0x34 # CHECK: teq $5, $7, 620
270x00 0xb3 0x55 0x30 # CHECK: tge $5, $19, 340
280x00 0xd1 0x00 0x36 # CHECK: tne $6, $17
290x00 0xe8 0xdd 0x76 # CHECK: tne $7, $8, 885
300x00 0xea 0x00 0x30 # CHECK: tge $7, $10
310x01 0x70 0x00 0x33 # CHECK: tltu $11, $16
320x01 0xed 0x00 0x32 # CHECK: tlt $15, $13
330x02 0x1d 0xfe 0x33 # CHECK: tltu $16, $sp, 1016
340x02 0x8e 0x5e 0xf1 # CHECK: tgeu $20, $14, 379
350x02 0xdc 0x00 0x31 # CHECK: tgeu $22, $gp
360x03 0x80 0xe8 0x50 # CHECK: clz $sp, $gp
370x04 0x11 0x14 0x9b # CHECK: bal 21104
38# The encode/decode functions are not inverses of each other.
390x18 0x02 0x01 0x4d # CHECK: blezalc $2, 1336
400x18 0x02 0xff 0xfa # CHECk: blezalc $2, -20
41# The encode/decode functions are not inverses of each other in the immediate case.
420x18 0x42 0x01 0x4d # CHECK: bgezalc $2, 1336
430x18 0x42 0xff 0xfa # CHECK: bgezalc $2, -20
440x18 0x43 0x00 0x40 # CHECK: bgeuc $2, $3, 260
450x18 0x43 0xff 0xfa # CHECK: bgeuc $2, $3, -20
46# The encode/decode functions are not inverses of each other in the immediate case.
470x1c 0x02 0x01 0x4d # CHECK: bgtzalc $2, 1336
480x1c 0x02 0xff 0xfa # CHECK: bgtzalc $2, -20
49# The encode/decode functions are not inverses of each other in the immediate case.
500x1c 0x42 0x01 0x4d # CHECK: bltzalc $2, 1336
510x1c 0x42 0xff 0xfa # CHECK: bltzalc $2, -20
520x1c 0xa6 0x00 0x40 # CHECK: bltuc $5, $6, 260
530x1c 0xa6 0xff 0xfa # CHECK: bltuc $5, $6, -20
540x20 0x00 0x00 0x01 # CHECK: bovc $zero, $zero, 8
55# The encode/decode functions are not inverses of each other in the immediate case.
560x20 0x02 0x01 0x4d # CHECK: beqzalc $2, 1336
570x20 0x40 0x00 0x01 # CHECK: bovc $2, $zero, 8
580x20 0x82 0x00 0x01 # CHECK: bovc $4, $2, 8
590x20 0xa6 0x00 0x40 # CHECK: beqc $5, $6, 260
600x25 0x29 0x00 0x0a # CHECK: addiu $9, $9, 10
610x30 0x42 0x00 0x04 # CHECK: andi $2, $2, 4
620x34 0x42 0x00 0x04 # CHECK: ori $2, $2, 4
630x3c 0x62 0xff 0xe9 # CHECK: aui $3, $2, -23
640x40 0x08 0x78 0x01 # CHECK: mfc0 $8, $15, 1
650x40 0x08 0x80 0x03 # CHECK: mfc0 $8, $16, 3
660x40 0x89 0x78 0x01 # CHECK: mtc0 $9, $15, 1
670x41 0x60 0x60 0x00 # CHECK: di
680x41 0x60 0x60 0x20 # CHECK: ei
690x41 0x6e 0x60 0x20 # CHECK: ei $14
700x41 0x7e 0x60 0x00 # CHECK: di $fp
71# FIXME: The encode/decode functions are not inverses of each other.
72#        The immediate should be 4 but the disassembler currently emits 8
730x45 0x20 0x00 0x01 # CHECK: bc1eqz $f0, 8
74# FIXME: The encode/decode functions are not inverses of each other.
75#        The immediate should be 4 but the disassembler currently emits 8
760x45 0x3f 0x00 0x01 # CHECK: bc1eqz $f31, 8
77# FIXME: The encode/decode functions are not inverses of each other.
78#        The immediate should be 4 but the disassembler currently emits 8
790x45 0xa0 0x00 0x01 # CHECK: bc1nez $f0, 8
80# FIXME: The encode/decode functions are not inverses of each other.
81#        The immediate should be 4 but the disassembler currently emits 8
820x45 0xbf 0x00 0x01 # CHECK: bc1nez $f31, 8
830x46 0x00 0x20 0x9a # CHECK: rint.s $f2, $f4
840x46 0x00 0x20 0x9b # CHECK: class.s $f2, $f4
850x46 0x02 0x08 0x10 # CHECK: sel.s $f0, $f1, $f2
860x46 0x04 0x10 0x14 # CHECK: seleqz.s $f0, $f2, $f4
870x46 0x04 0x10 0x17 # CHECK: selnez.s $f0, $f2, $f4
880x46 0x04 0x10 0x1c # CHECK: min.s $f0, $f2, $f4
890x46 0x04 0x10 0x1d # CHECK: max.s $f0, $f2, $f4
900x46 0x04 0x10 0x1e # CHECK: mina.s $f0, $f2, $f4
910x46 0x04 0x10 0x1f # CHECK: maxa.s $f0, $f2, $f4
920x46 0x04 0x18 0x98 # CHECK: maddf.s $f2, $f3, $f4
930x46 0x04 0x18 0x99 # CHECK: msubf.s $f2, $f3, $f4
940x46 0x20 0x20 0x9a # CHECK: rint.d $f2, $f4
950x46 0x20 0x20 0x9b # CHECK: class.d $f2, $f4
960x46 0x22 0x08 0x10 # CHECK: sel.d $f0, $f1, $f2
970x46 0x24 0x10 0x14 # CHECK: seleqz.d $f0, $f2, $f4
980x46 0x24 0x10 0x17 # CHECK: selnez.d $f0, $f2, $f4
990x46 0x24 0x10 0x1c # CHECK: min.d $f0, $f2, $f4
1000x46 0x24 0x10 0x1d # CHECK: max.d $f0, $f2, $f4
1010x46 0x24 0x10 0x1e # CHECK: mina.d $f0, $f2, $f4
1020x46 0x24 0x10 0x1f # CHECK: maxa.d $f0, $f2, $f4
1030x46 0x24 0x18 0x98 # CHECK: maddf.d $f2, $f3, $f4
1040x46 0x24 0x18 0x99 # CHECK: msubf.d $f2, $f3, $f4
1050x46 0x84 0x18 0x80 # CHECK: cmp.af.s $f2, $f3, $f4
1060x46 0x84 0x18 0x81 # CHECK: cmp.un.s $f2, $f3, $f4
1070x46 0x84 0x18 0x82 # CHECK: cmp.eq.s $f2, $f3, $f4
1080x46 0x84 0x18 0x83 # CHECK: cmp.ueq.s $f2, $f3, $f4
1090x46 0x84 0x18 0x84 # CHECK: cmp.lt.s $f2, $f3, $f4
1100x46 0x84 0x18 0x85 # CHECK: cmp.ult.s $f2, $f3, $f4
1110x46 0x84 0x18 0x86 # CHECK: cmp.le.s $f2, $f3, $f4
1120x46 0x84 0x18 0x87 # CHECK: cmp.ule.s $f2, $f3, $f4
1130x46 0x84 0x18 0x88 # CHECK: cmp.saf.s $f2, $f3, $f4
1140x46 0x84 0x18 0x89 # CHECK: cmp.sun.s $f2, $f3, $f4
1150x46 0x84 0x18 0x8a # CHECK: cmp.seq.s $f2, $f3, $f4
1160x46 0x84 0x18 0x8b # CHECK: cmp.sueq.s $f2, $f3, $f4
1170x46 0x84 0x18 0x8c # CHECK: cmp.slt.s $f2, $f3, $f4
1180x46 0x84 0x18 0x8d # CHECK: cmp.sult.s $f2, $f3, $f4
1190x46 0x84 0x18 0x8e # CHECK: cmp.sle.s $f2, $f3, $f4
1200x46 0x84 0x18 0x8f # CHECK: cmp.sule.s $f2, $f3, $f4
1210x46 0xa4 0x18 0x80 # CHECK: cmp.af.d $f2, $f3, $f4
1220x46 0xa4 0x18 0x81 # CHECK: cmp.un.d $f2, $f3, $f4
1230x46 0xa4 0x18 0x82 # CHECK: cmp.eq.d $f2, $f3, $f4
1240x46 0xa4 0x18 0x83 # CHECK: cmp.ueq.d $f2, $f3, $f4
1250x46 0xa4 0x18 0x84 # CHECK: cmp.lt.d $f2, $f3, $f4
1260x46 0xa4 0x18 0x85 # CHECK: cmp.ult.d $f2, $f3, $f4
1270x46 0xa4 0x18 0x86 # CHECK: cmp.le.d $f2, $f3, $f4
1280x46 0xa4 0x18 0x87 # CHECK: cmp.ule.d $f2, $f3, $f4
1290x46 0xa4 0x18 0x88 # CHECK: cmp.saf.d $f2, $f3, $f4
1300x46 0xa4 0x18 0x89 # CHECK: cmp.sun.d $f2, $f3, $f4
1310x46 0xa4 0x18 0x8a # CHECK: cmp.seq.d $f2, $f3, $f4
1320x46 0xa4 0x18 0x8b # CHECK: cmp.sueq.d $f2, $f3, $f4
1330x46 0xa4 0x18 0x8c # CHECK: cmp.slt.d $f2, $f3, $f4
1340x46 0xa4 0x18 0x8d # CHECK: cmp.sult.d $f2, $f3, $f4
1350x46 0xa4 0x18 0x8e # CHECK: cmp.sle.d $f2, $f3, $f4
1360x46 0xa4 0x18 0x8f # CHECK: cmp.sule.d $f2, $f3, $f4
1370x42 0x00 0x00 0x58 # CHECK: eretnc
138# FIXME: The encode/decode functions are not inverses of each other.
139#        The immediate should be 8 but the disassembler currently emits 12
1400x49 0x20 0x00 0x02 # CHECK: bc2eqz $0, 12
141# FIXME: The encode/decode functions are not inverses of each other.
142#        The immediate should be 8 but the disassembler currently emits 12
1430x49 0x3f 0x00 0x02 # CHECK: bc2eqz $31, 12
1440x49 0x52 0x34 0xb7 # CHECK: lwc2 $18, -841($6)
1450x49 0x79 0x81 0x30 # CHECK: swc2 $25, 304($16)
146# FIXME: The encode/decode functions are not inverses of each other.
147#        The immediate should be 8 but the disassembler currently emits 12
1480x49 0xa0 0x00 0x02 # CHECK: bc2nez $0, 12
149# FIXME: The encode/decode functions are not inverses of each other.
150#        The immediate should be 8 but the disassembler currently emits 12
1510x49 0xbf 0x00 0x02 # CHECK: bc2nez $31, 12
1520x49 0xc8 0x0d 0x43 # CHECK: ldc2 $8, -701($1)
1530x49 0xf4 0x92 0x75 # CHECK: sdc2 $20, 629($18)
1540x58 0x05 0x00 0x40 # CHECK: blezc $5, 260
1550x58 0x05 0xff 0xfa # CHECk: blezc $5, -20
1560x58 0x43 0x00 0x40 # CHECK: bgec $2, $3, 260
1570x58 0x43 0xff 0xfa # CHECK: bgec $2, $3, -20
1580x58 0xa5 0x00 0x40 # CHECK: bgezc $5, 260
1590x58 0xa5 0xff 0xfa # CHECK: bgezc $5, -20
1600x5c 0x05 0x00 0x40 # CHECK: bgtzc $5, 260
1610x5c 0x05 0xff 0xfa # CHECk: bgtzc $5, -20
1620x5c 0xa5 0x00 0x40 # CHECK: bltzc $5, 260
1630x5c 0xa5 0xff 0xfa # CHECK: bltzc $5, -20
1640x5c 0xa6 0x00 0x40 # CHECK: bltc $5, $6, 260
1650x5c 0xa6 0xff 0xfa # CHECK: bltc $5, $6, -20
1660x60 0x00 0x00 0x01 # CHECK: bnvc $zero, $zero, 8
167# The encode/decode functions are not inverses of each other in the immediate case.
1680x60 0x02 0x01 0x4d # CHECK: bnezalc $2, 1336
1690x60 0x40 0x00 0x01 # CHECK: bnvc $2, $zero, 8
1700x60 0x82 0x00 0x01 # CHECK: bnvc $4, $2, 8
1710x60 0xa6 0x00 0x40 # CHECK: bnec $5, $6, 260
1720x60 0x43 0xff 0xfa # CHECK: bnec $2, $3, -20
1730x7c 0x02 0x20 0x20 # CHECK: bitswap $4, $2
1740x7c 0x43 0x22 0xa0 # CHECK: align $4, $2, $3, 2
1750x7c 0xa1 0x04 0x25 # CHECK: cache 1, 8($5)
1760x7c 0xa1 0x04 0x35 # CHECK: pref 1, 8($5)
1770x7e 0x42 0xb3 0xb6 # CHECK: ll $2, -153($18)
1780x7e 0x6f 0xec 0x26 # CHECK: sc $15, -40($19)
1790xc8 0x37 0x96 0xb8 # CHECK: bc 14572260
1800xd8 0x05 0x01 0x00 # CHECK: jic $5, 256
1810xd8 0xa0 0x46 0x90 # CHECK: beqzc $5, 72260
1820xd8 0x5f 0xff 0xfa # CHECK: beqzc $2, -20
1830xe8 0x37 0x96 0xb8 # CHECK: balc 14572260
1840xec 0x48 0x00 0x43 # CHECK: lwpc $2, 268
1850xec 0x50 0x00 0x43 # CHECK: lwupc $2, 268
1860xec 0x7e 0xff 0xff # CHECK: auipc $3, -1
1870xec 0x7f 0x00 0x38 # CHECK: aluipc $3, 56
1880xec 0x80 0x00 0x19 # CHECK: addiupc $4, 100
1890xf8 0x05 0x01 0x00 # CHECK: jialc $5, 256
1900xf8 0xa0 0x46 0x90 # CHECK: bnezc $5, 72260
1910xf8 0x5f 0xff 0xfa # CHECK: bnezc $2, -20
192