1 # RUN: llvm-mc --disassemble %s -triple=mips-unknown-linux -mattr=micromips \ 2 # RUN: | FileCheck %s 3 4 0x4f 0xf9 # CHECK: addiusp -16 5 0x4f 0xff # CHECK: addiusp -1028 6 0x4f 0xfd # CHECK: addiusp -1032 7 0x4c 0x01 # CHECK: addiusp 1024 8 0x4c 0x03 # CHECK: addiusp 1028 9 0x2c 0x29 # CHECK: andi16 $16, $2, 31 10 0x47 0x05 # CHECK: jraddiusp 20 11 0x07 0x42 # CHECK: addu16 $6, $17, $4 12 0x06 0xb1 # CHECK: subu16 $5, $16, $3 13 0x44 0x82 # CHECK: and16 $16, $2 14 0x44 0x0b # CHECK: not16 $17, $3 15 0x44 0xc4 # CHECK: or16 $16, $4 16 0x44 0x4d # CHECK: xor16 $17, $5 17 0x25 0x8a # CHECK: sll16 $3, $16, 5 18 0x26 0x1d # CHECK: srl16 $4, $17, 6 19 0x09 0x94 # CHECK: lbu16 $3, 4($17) 20 0x09 0x8f # CHECK: lbu16 $3, -1($16) 21 0x29 0x82 # CHECK: lhu16 $3, 4($16) 22 0x6a 0x12 # CHECK: lw16 $4, 8($17) 23 0x89 0x84 # CHECK: sb16 $3, 4($16) 24 0xaa 0x14 # CHECK: sh16 $4, 8($17) 25 0xea 0x11 # CHECK: sw16 $4, 4($17) 26 0xe8 0x11 # CHECK: sw16 $zero, 4($17) 27 0x46 0x09 # CHECK: mfhi $9 28 0x46 0x49 # CHECK: mflo $9 29 0x0f 0x21 # CHECK: move $25, $1 30 0x45 0xa9 # CHECK: jrc $9 31 0x45 0xc9 # CHECK: jalr $9 32 0x45 0xe9 # CHECK: jalrs16 $9 33 0x45 0x89 # CHECK: jr16 $9 34 0xed 0xff # CHECK: li16 $3, -1 35 0xed 0xfe # CHECK: li16 $3, 126 36 0x6f 0x83 # CHECK: addiur1sp $7, 4 37 0x6f 0x7e # CHECK: addiur2 $6, $7, -1 38 0x6f 0x76 # CHECK: addiur2 $6, $7, 12 39 0x4c 0xfc # CHECK: addius5 $7, -2 40 0x0c 0x00 # CHECK: nop 41 0x48 0x68 # CHECK: lw $3, 32($sp) 42 0xc8 0x9f # CHECK: sw $4, 124($sp) 43 0x8f 0x0a # CHECK: beqz16 $6, 20 44 0xaf 0x0a # CHECK: bnez16 $6, 20 45 0xcc 0x42 # CHECK: b16 132 46 0x65 0x88 # CHECK: lw $3, 32($gp) 47 0x45 0x12 # CHECK: lwm16 $16, $17, $ra, 8($sp) 48 0x45 0x52 # CHECK: swm16 $16, $17, $ra, 8($sp) 49 0x46 0x88 # CHECK: break16 8 50 0x46 0xce # CHECK: sdbbp16 14 51 0x84 0x34 # CHECK: movep $5, $6, $2, $3 52 0x00 0xe6 0x49 0x10 # CHECK: add $9, $6, $7 53 0x11 0x26 0x45 0x67 # CHECK: addi $9, $6, 17767 54 0x31 0x26 0xc5 0x67 # CHECK: addiu $9, $6, -15001 55 0x11 0x26 0x45 0x67 # CHECK: addi $9, $6, 17767 56 0x31 0x26 0xc5 0x67 # CHECK: addiu $9, $6, -15001 57 0x00 0xe6 0x49 0x50 # CHECK: addu $9, $6, $7 58 0x00 0xe6 0x49 0x90 # CHECK: sub $9, $6, $7 59 0x00 0xa3 0x21 0xd0 # CHECK: subu $4, $3, $5 60 0x00 0xe0 0x31 0x90 # CHECK: sub $6, $zero, $7 61 0x00 0xe0 0x31 0xd0 # CHECK: subu $6, $zero, $7 62 0x00 0x08 0x39 0x50 # CHECK: addu $7, $8, $zero 63 0x00 0xa3 0x1b 0x50 # CHECK: slt $3, $3, $5 64 0x90 0x63 0x00 0x67 # CHECK: slti $3, $3, 103 65 0x90 0x63 0x00 0x67 # CHECK: slti $3, $3, 103 66 0xb0 0x63 0x00 0x67 # CHECK: sltiu $3, $3, 103 67 0x00 0xa3 0x1b 0x90 # CHECK: sltu $3, $3, $5 68 0x41 0xa9 0x45 0x67 # CHECK: lui $9, 17767 69 0x00 0xe6 0x4a 0x50 # CHECK: and $9, $6, $7 70 0xd1 0x26 0x45 0x67 # CHECK: andi $9, $6, 17767 71 0x00 0xa4 0x1a 0x90 # CHECK: or $3, $4, $5 72 0x51 0x26 0x45 0x67 # CHECK: ori $9, $6, 17767 73 0x00 0xa3 0x1b 0x10 # CHECK: xor $3, $3, $5 74 0x71 0x26 0x45 0x67 # CHECK: xori $9, $6, 17767 75 0x00 0xe6 0x4a 0xd0 # CHECK: nor $9, $6, $7 76 0x00 0x08 0x3a 0xd0 # CHECK: not $7, $8 77 0x00 0xe6 0x4a 0x10 # CHECK: mul $9, $6, $7 78 0x00 0xe9 0x8b 0x3c # CHECK: mult $9, $7 79 0x00 0xe9 0x9b 0x3c # CHECK: multu $9, $7 80 0x00 0xe9 0xab 0x3c # CHECK: div $zero, $9, $7 81 0x00 0xe9 0xbb 0x3c # CHECK: divu $zero, $9, $7 82 0x00 0x83 0x38 0x00 # CHECK: sll $4, $3, 7 83 0x00 0x65 0x10 0x10 # CHECK: sllv $2, $3, $5 84 0x00 0x83 0x38 0x80 # CHECK: sra $4, $3, 7 85 0x00 0x65 0x10 0x90 # CHECK: srav $2, $3, $5 86 0x00 0x83 0x38 0x40 # CHECK: srl $4, $3, 7 87 0x00 0x65 0x10 0x50 # CHECK: srlv $2, $3, $5 88 0x01 0x26 0x38 0xc0 # CHECK: rotr $9, $6, 7 89 0x00 0xc7 0x48 0xd0 # CHECK: rotrv $9, $6, $7 90 0x1c 0xa4 0x00 0x08 # CHECK: lb $5, 8($4) 91 0x14 0xc4 0x00 0x08 # CHECK: lbu $6, 8($4) 92 0x3c 0x44 0x00 0x08 # CHECK: lh $2, 8($4) 93 0x34 0x82 0x00 0x08 # CHECK: lhu $4, 8($2) 94 0xfc 0xc5 0x00 0x04 # CHECK: lw $6, 4($5) 95 0xfc 0xdd 0x00 0x7b # CHECK: lw $6, 123($sp) 96 0x18 0xa4 0x00 0x08 # CHECK: sb $5, 8($4) 97 0x38 0x44 0x00 0x08 # CHECK: sh $2, 8($4) 98 0xf8 0xa6 0x00 0x04 # CHECK: sw $5, 4($6) 99 0xf8 0xbd 0x00 0x7b # CHECK: sw $5, 123($sp) 100 0x60 0x44 0xe0 0x08 # CHECK: lwu $2, 8($4) 101 0x60 0x85 0x00 0x10 # CHECK: lwl $4, 16($5) 102 0x60 0x85 0x10 0x10 # CHECK: lwr $4, 16($5) 103 0x60 0x85 0x80 0x10 # CHECK: swl $4, 16($5) 104 0x60 0x85 0x90 0x10 # CHECK: swr $4, 16($5) 105 0x00 0xe6 0x48 0x58 # CHECK: movz $9, $6, $7 106 0x00 0xe6 0x48 0x18 # CHECK: movn $9, $6, $7 107 0x55 0x26 0x09 0x7b # CHECK: movt $9, $6, $fcc0 108 0x55 0x26 0x01 0x7b # CHECK: movf $9, $6, $fcc0 109 0x00 0x06 0x2d 0x7c # CHECK: mthi $6 110 0x00 0x06 0x0d 0x7c # CHECK: mfhi $6 111 0x00 0x06 0x3d 0x7c # CHECK: mtlo $6 112 0x00 0x06 0x1d 0x7c # CHECK: mflo $6 113 0x00 0xa4 0xcb 0x3c # CHECK: madd $4, $5 114 0x00 0xa4 0xdb 0x3c # CHECK: maddu $4, $5 115 0x00 0xa4 0xeb 0x3c # CHECK: msub $4, $5 116 0x00 0xa4 0xfb 0x3c # CHECK: msubu $4, $5 117 0x01 0x26 0x5b 0x3c # CHECK: clz $9, $6 118 0x01 0x26 0x4b 0x3c # CHECK: clo $9, $6 119 0x01 0x26 0x2b 0x3c # CHECK: seb $9, $6 120 0x01 0x26 0x3b 0x3c # CHECK: seh $9, $6 121 0x01 0x26 0x7b 0x3c # CHECK: wsbh $9, $6 122 0x01 0x26 0x30 0xec # CHECK: ext $9, $6, 3, 7 123 0x01 0x26 0x48 0xcc # CHECK: ins $9, $6, 3, 7 124 0xd4 0x00 0x02 0x98 # CHECK: j 1328 125 0xf4 0x00 0x02 0x98 # CHECK: jal 1328 126 0x03 0xe6 0x0f 0x3c # CHECK: jalr $ra, $6 127 0x00 0x07 0x0f 0x3c # CHECK: jr $7 128 0x94 0xc9 0x02 0x9a # CHECK: beq $9, $6, 1332 129 0x40 0x46 0x02 0x9a # CHECK: bgez $6, 1332 130 0x40 0x66 0x02 0x9a # CHECK: bgezal $6, 1332 131 0x40 0x26 0x02 0x9a # CHECK: bltzal $6, 1332 132 0x40 0xc6 0x02 0x9a # CHECK: bgtz $6, 1332 133 0x40 0x86 0x02 0x9a # CHECK: blez $6, 1332 134 0xb4 0xc9 0x02 0x9a # CHECK: bne $9, $6, 1332 135 0x40 0x06 0x02 0x9a # CHECK: bltz $6, 1332 136 0x01 0x28 0x00 0x3c # CHECK: teq $8, $9 137 0x01 0x28 0x02 0x3c # CHECK: tge $8, $9 138 0x01 0x28 0x04 0x3c # CHECK: tgeu $8, $9 139 0x01 0x28 0x08 0x3c # CHECK: tlt $8, $9 140 0x01 0x28 0x0a 0x3c # CHECK: tltu $8, $9 141 0x01 0x28 0x0c 0x3c # CHECK: tne $8, $9 142 0x41 0xc9 0x45 0x67 # CHECK: teqi $9, 17767 143 0x41 0x29 0x45 0x67 # CHECK: tgei $9, 17767 144 0x41 0x69 0x45 0x67 # CHECK: tgeiu $9, 17767 145 0x41 0x09 0x45 0x67 # CHECK: tlti $9, 17767 146 0x41 0x49 0x45 0x67 # CHECK: tltiu $9, 17767 147 0x41 0x89 0x45 0x67 # CHECK: tnei $9, 17767 148 0x20 0x25 0x60 0x08 # CHECK: cache 1, 8($5) 149 0x60 0x25 0x20 0x08 # CHECK: pref 1, 8($5) 150 0x00 0x00 0x08 0x00 # CHECK: ssnop 151 0x00 0x00 0x18 0x00 # CHECK: ehb 152 0x00 0x00 0x28 0x00 # CHECK: pause 153 0x60 0x44 0x30 0x08 # CHECK: ll $2, 8($4) 154 0x60 0x44 0xb0 0x08 # CHECK: sc $2, 8($4) 155 0x00 0x64 0x11 0x18 # CHECK: lwxs $2, $3($4) 156 0x42 0x66 0x02 0x9a # CHECK: bgezals $6, 1332 157 0x42 0x26 0x02 0x9a # CHECK: bltzals $6, 1332 158 0x40 0xe9 0x02 0x9a # CHECK: beqzc $9, 1332 159 0x40 0xa9 0x02 0x9a # CHECK: bnezc $9, 1332 160 0x74 0x00 0x02 0x98 # CHECK: jals 1328 161 0x03 0xe6 0x4f 0x3c # CHECK: jalrs $ra, $6 162 0x20 0x44 0x50 0x08 # CHECK: lwm32 $16, $17, 8($4) 163 0x21 0x3b 0x59 0x84 # CHECK: lwm32 $16, $17, $18, $19, $20, $21, $22, $23, $fp, -1660($27) 164 0x20 0x44 0xd0 0x08 # CHECK: swm32 $16, $17, 8($4) 165 0x22 0x04 0x90 0x08 # CHECK: swp $16, 8($4) 166 0x22 0x04 0x10 0x08 # CHECK: lwp $16, 8($4) 167 0x00 0x00 0x00 0x00 # CHECK: nop 168 0x79 0x00 0x00 0x05 # CHECK: addiupc $2, 20 169 0x7b 0xbf 0xff 0xff # CHECK: addiupc $7, 16777212 170 0x7b 0xc0 0x00 0x00 # CHECK: addiupc $7, -16777216 171 0x00 0x00 0x57 0x7c # CHECK: ei 172 0x00 0x0a 0x57 0x7c # CHECK: ei $10 173 0x60 0x25 0xa6 0x08 # CHECK: cachee 1, 8($5) 174 0x60 0x25 0xa4 0x08 # CHECK: prefe 1, 8($5) 175 0x54 0x65 0x09 0xa0 # CHECK: prefx 1, $3($5) 176 0x60 0x82 0x62 0x08 # CHECK: lhue $4, 8($2) 177 0x60 0x82 0x68 0x08 # CHECK: lbe $4, 8($2) 178 0x60 0x82 0x60 0x08 # CHECK: lbue $4, 8($2) 179 0x60 0x82 0x6a 0x08 # CHECK: lhe $4, 8($2) 180 0x60 0x82 0x6e 0x08 # CHECK: lwe $4, 8($2) 181 0x60 0xa4 0xa8 0x08 # CHECK: sbe $5, 8($4) 182 0x60 0xa4 0xaa 0x08 # CHECK: she $5, 8($4) 183 0x60 0xa4 0xae 0x08 # CHECK: swe $5, 8($4) 184 0x63 0x03 0xa2 0x05 # CHECK: swre $24, 5($3) 185 0x63 0x03 0xa0 0x05 # CHECK: swle $24, 5($3) 186 0x63 0x03 0x66 0x05 # CHECK: lwre $24, 5($3) 187 0x63 0x04 0x64 0x02 # CHECK: lwle $24, 2($4) 188 0x60 0x44 0x6c 0x08 # CHECK: lle $2, 8($4) 189 0x60 0x44 0xac 0x08 # CHECK: sce $2, 8($4) 190 0x00 0x00 0x8b 0x7c # CHECK: syscall 191 0x01 0x8c 0x8b 0x7c # CHECK: syscall 396 192 0xbc 0xea 0x01 0x2c # CHECK: ldc1 $f7, 300($10) 193 0xbd 0x0a 0x01 0x2c # CHECK: ldc1 $f8, 300($10) 194 0x9c 0x46 0x00 0x04 # CHECK: lwc1 $f2, 4($6) 195 0xb8 0x46 0x00 0x04 # CHECK: sdc1 $f2, 4($6) 196 0xb8 0xea 0x00 0x40 # CHECK: sdc1 $f7, 64($10) 197 0x98 0x46 0x00 0x04 # CHECK: swc1 $f2, 4($6) 198