1*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | \ 2*9880d681SAndroid Build Coastguard Worker# RUN: FileCheck %s --check-prefixes=CHECK,CHECK-LE 3*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips32r2 | \ 4*9880d681SAndroid Build Coastguard Worker# RUN: FileCheck %s --check-prefixes=CHECK,CHECK-BE 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker# Check that the IAS expands macro instructions in the same way as GAS. 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker# Load address, done by MipsAsmParser::expandLoadAddressReg() 9*9880d681SAndroid Build Coastguard Worker# and MipsAsmParser::expandLoadAddressImm(): 10*9880d681SAndroid Build Coastguard Worker la $8, 1f 11*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $8, %hi($tmp0) # encoding: [A,A,0x08,0x3c] 12*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %hi($tmp0), kind: fixup_Mips_HI16 13*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $8, $8, %lo($tmp0) # encoding: [A,A,0x08,0x25] 14*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Worker# LW/SW and LDC1/SDC1 of symbol address, done by MipsAsmParser::expandMemInst(): 17*9880d681SAndroid Build Coastguard Worker .set noat 18*9880d681SAndroid Build Coastguard Worker lw $10, symbol($4) 19*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $10, %hi(symbol) # encoding: [A,A,0x0a,0x3c] 20*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %hi(symbol), kind: fixup_Mips_HI16 21*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01] 22*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lw $10, %lo(symbol)($10) # encoding: [A,A,0x4a,0x8d] 23*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %lo(symbol), kind: fixup_Mips_LO16 24*9880d681SAndroid Build Coastguard Worker .set at 25*9880d681SAndroid Build Coastguard Worker sw $10, symbol($9) 26*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, %hi(symbol) # encoding: [A,A,0x01,0x3c] 27*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %hi(symbol), kind: fixup_Mips_HI16 28*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 29*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sw $10, %lo(symbol)($1) # encoding: [A,A,0x2a,0xac] 30*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %lo(symbol), kind: fixup_Mips_LO16 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Worker lw $8, 1f 33*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $8, %hi($tmp0) # encoding: [A,A,0x08,0x3c] 34*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %hi($tmp0), kind: fixup_Mips_HI16 35*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lw $8, %lo($tmp0)($8) # encoding: [A,A,0x08,0x8d] 36*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16 37*9880d681SAndroid Build Coastguard Worker sw $8, 1f 38*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, %hi($tmp0) # encoding: [A,A,0x01,0x3c] 39*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %hi($tmp0), kind: fixup_Mips_HI16 40*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sw $8, %lo($tmp0)($1) # encoding: [A,A,0x28,0xac] 41*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %lo($tmp0), kind: fixup_Mips_LO16 42*9880d681SAndroid Build Coastguard Worker 43*9880d681SAndroid Build Coastguard Worker lw $10, 655483($4) 44*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $10, 10 # encoding: [0x0a,0x00,0x0a,0x3c] 45*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $10, $10, $4 # encoding: [0x21,0x50,0x44,0x01] 46*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lw $10, 123($10) # encoding: [0x7b,0x00,0x4a,0x8d] 47*9880d681SAndroid Build Coastguard Worker sw $10, 123456($9) 48*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 2 # encoding: [0x02,0x00,0x01,0x3c] 49*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 50*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sw $10, -7616($1) # encoding: [0x40,0xe2,0x2a,0xac] 51*9880d681SAndroid Build Coastguard Worker 52*9880d681SAndroid Build Coastguard Worker lw $8, symbol 53*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $8, %hi(symbol) # encoding: [A,A,0x08,0x3c] 54*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %hi(symbol), kind: fixup_Mips_HI16 55*9880d681SAndroid Build Coastguard Worker# CHECK-LE-NOT: move $8, $8 # encoding: [0x21,0x40,0x00,0x01] 56*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lw $8, %lo(symbol)($8) # encoding: [A,A,0x08,0x8d] 57*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %lo(symbol), kind: fixup_Mips_LO16 58*9880d681SAndroid Build Coastguard Worker sw $8, symbol 59*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, %hi(symbol) # encoding: [A,A,0x01,0x3c] 60*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %hi(symbol), kind: fixup_Mips_HI16 61*9880d681SAndroid Build Coastguard Worker# CHECK-LE-NOT: move $1, $1 # encoding: [0x21,0x08,0x20,0x00] 62*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sw $8, %lo(symbol)($1) # encoding: [A,A,0x28,0xac] 63*9880d681SAndroid Build Coastguard Worker# CHECK-LE: # fixup A - offset: 0, value: %lo(symbol), kind: fixup_Mips_LO16 64*9880d681SAndroid Build Coastguard Worker 65*9880d681SAndroid Build Coastguard Worker ldc1 $f0, symbol 66*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, %hi(symbol) 67*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ldc1 $f0, %lo(symbol)($1) 68*9880d681SAndroid Build Coastguard Worker sdc1 $f0, symbol 69*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, %hi(symbol) 70*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sdc1 $f0, %lo(symbol)($1) 71*9880d681SAndroid Build Coastguard Worker 72*9880d681SAndroid Build Coastguard Worker# Test BNE with an immediate as the 2nd operand. 73*9880d681SAndroid Build Coastguard Worker bne $2, 0, 1332 74*9880d681SAndroid Build Coastguard Worker# CHECK-LE: bnez $2, 1332 # encoding: [0x4d,0x01,0x40,0x14] 75*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 76*9880d681SAndroid Build Coastguard Worker 77*9880d681SAndroid Build Coastguard Worker bne $2, 123, 1332 78*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $1, $zero, 123 # encoding: [0x7b,0x00,0x01,0x24] 79*9880d681SAndroid Build Coastguard Worker# CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 80*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 81*9880d681SAndroid Build Coastguard Worker 82*9880d681SAndroid Build Coastguard Worker bne $2, -2345, 1332 83*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $1, $zero, -2345 # encoding: [0xd7,0xf6,0x01,0x24] 84*9880d681SAndroid Build Coastguard Worker# CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 85*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 86*9880d681SAndroid Build Coastguard Worker 87*9880d681SAndroid Build Coastguard Worker bne $2, 65538, 1332 88*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 89*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 2 # encoding: [0x02,0x00,0x21,0x34] 90*9880d681SAndroid Build Coastguard Worker# CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 91*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 92*9880d681SAndroid Build Coastguard Worker 93*9880d681SAndroid Build Coastguard Worker bne $2, ~7, 1332 94*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $1, $zero, -8 # encoding: [0xf8,0xff,0x01,0x24] 95*9880d681SAndroid Build Coastguard Worker# CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 96*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 97*9880d681SAndroid Build Coastguard Worker 98*9880d681SAndroid Build Coastguard Worker bne $2, 0x10000, 1332 99*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 100*9880d681SAndroid Build Coastguard Worker# CHECK-LE: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 101*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 102*9880d681SAndroid Build Coastguard Worker 103*9880d681SAndroid Build Coastguard Worker# Test BEQ with an immediate as the 2nd operand. 104*9880d681SAndroid Build Coastguard Worker beq $2, 0, 1332 105*9880d681SAndroid Build Coastguard Worker# CHECK-LE: beqz $2, 1332 # encoding: [0x4d,0x01,0x40,0x10] 106*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 107*9880d681SAndroid Build Coastguard Worker 108*9880d681SAndroid Build Coastguard Worker beq $2, 123, 1332 109*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $1, $zero, 123 # encoding: [0x7b,0x00,0x01,0x24] 110*9880d681SAndroid Build Coastguard Worker# CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 111*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 112*9880d681SAndroid Build Coastguard Worker 113*9880d681SAndroid Build Coastguard Worker beq $2, -2345, 1332 114*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $1, $zero, -2345 # encoding: [0xd7,0xf6,0x01,0x24] 115*9880d681SAndroid Build Coastguard Worker# CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 116*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 117*9880d681SAndroid Build Coastguard Worker 118*9880d681SAndroid Build Coastguard Worker beq $2, 65538, 1332 119*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 120*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 2 # encoding: [0x02,0x00,0x21,0x34] 121*9880d681SAndroid Build Coastguard Worker# CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 122*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 123*9880d681SAndroid Build Coastguard Worker 124*9880d681SAndroid Build Coastguard Worker beq $2, ~7, 1332 125*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $1, $zero, -8 # encoding: [0xf8,0xff,0x01,0x24] 126*9880d681SAndroid Build Coastguard Worker# CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 127*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 128*9880d681SAndroid Build Coastguard Worker 129*9880d681SAndroid Build Coastguard Worker beq $2, 0x10000, 1332 130*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 131*9880d681SAndroid Build Coastguard Worker# CHECK-LE: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 132*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 133*9880d681SAndroid Build Coastguard Worker 134*9880d681SAndroid Build Coastguard Worker beq $2, 65538, foo 135*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 136*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 2 # encoding: [0x02,0x00,0x21,0x34] 137*9880d681SAndroid Build Coastguard Worker# CHECK-LE: beq $2, $1, foo # encoding: [A,A,0x41,0x10] 138*9880d681SAndroid Build Coastguard Worker# CHECK-LE: nop # encoding: [0x00,0x00,0x00,0x00] 139*9880d681SAndroid Build Coastguard Worker 140*9880d681SAndroid Build Coastguard Worker# Test ULH with immediate operand. 141*9880d681SAndroid Build Coastguard Workerulh_imm: # CHECK-LABEL: ulh_imm: 142*9880d681SAndroid Build Coastguard Worker ulh $8, 0 143*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $1, 0($zero) # encoding: [0x80,0x01,0x00,0x00] 144*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 1($zero) # encoding: [0x90,0x08,0x00,0x01] 145*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00] 146*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 147*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $1, 1($zero) # encoding: [0x01,0x00,0x01,0x80] 148*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 0($zero) # encoding: [0x00,0x00,0x08,0x90] 149*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00] 150*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 151*9880d681SAndroid Build Coastguard Worker 152*9880d681SAndroid Build Coastguard Worker ulh $8, 2 153*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $1, 2($zero) # encoding: [0x80,0x01,0x00,0x02] 154*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 3($zero) # encoding: [0x90,0x08,0x00,0x03] 155*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00] 156*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 157*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $1, 3($zero) # encoding: [0x03,0x00,0x01,0x80] 158*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 2($zero) # encoding: [0x02,0x00,0x08,0x90] 159*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00] 160*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 161*9880d681SAndroid Build Coastguard Worker 162*9880d681SAndroid Build Coastguard Worker ulh $8, 0x8000 163*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00] 164*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00] 165*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 166*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 167*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 168*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34] 169*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80] 170*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 171*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 172*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 173*9880d681SAndroid Build Coastguard Worker 174*9880d681SAndroid Build Coastguard Worker ulh $8, -0x8000 175*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $1, -32768($zero) # encoding: [0x80,0x01,0x80,0x00] 176*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, -32767($zero) # encoding: [0x90,0x08,0x80,0x01] 177*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00] 178*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 179*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $1, -32767($zero) # encoding: [0x01,0x80,0x01,0x80] 180*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, -32768($zero) # encoding: [0x00,0x80,0x08,0x90] 181*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00] 182*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 183*9880d681SAndroid Build Coastguard Worker 184*9880d681SAndroid Build Coastguard Worker ulh $8, 0x10000 185*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01] 186*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00] 187*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 188*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 189*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 190*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 191*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80] 192*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 193*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 194*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 195*9880d681SAndroid Build Coastguard Worker 196*9880d681SAndroid Build Coastguard Worker ulh $8, 0x18888 197*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01] 198*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88] 199*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00] 200*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 201*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 202*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 203*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 204*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34] 205*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80] 206*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 207*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 208*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 209*9880d681SAndroid Build Coastguard Worker 210*9880d681SAndroid Build Coastguard Worker ulh $8, -32769 211*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff] 212*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff] 213*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00] 214*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 215*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 216*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 217*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c] 218*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34] 219*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80] 220*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 221*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 222*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 223*9880d681SAndroid Build Coastguard Worker 224*9880d681SAndroid Build Coastguard Worker ulh $8, 32767 225*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addiu $1, $zero, 32767 # encoding: [0x24,0x01,0x7f,0xff] 226*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00] 227*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 228*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 229*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 230*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $1, $zero, 32767 # encoding: [0xff,0x7f,0x01,0x24] 231*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80] 232*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 233*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 234*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 235*9880d681SAndroid Build Coastguard Worker 236*9880d681SAndroid Build Coastguard Worker# Test ULH with immediate offset and a source register operand. 237*9880d681SAndroid Build Coastguard Workerulh_reg: # CHECK-LABEL: ulh_reg: 238*9880d681SAndroid Build Coastguard Worker ulh $8, 0($9) 239*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $1, 0($9) # encoding: [0x81,0x21,0x00,0x00] 240*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 1($9) # encoding: [0x91,0x28,0x00,0x01] 241*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00] 242*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 243*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $1, 1($9) # encoding: [0x01,0x00,0x21,0x81] 244*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 0($9) # encoding: [0x00,0x00,0x28,0x91] 245*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00] 246*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 247*9880d681SAndroid Build Coastguard Worker 248*9880d681SAndroid Build Coastguard Worker ulh $8, 2($9) 249*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $1, 2($9) # encoding: [0x81,0x21,0x00,0x02] 250*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 3($9) # encoding: [0x91,0x28,0x00,0x03] 251*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00] 252*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 253*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $1, 3($9) # encoding: [0x03,0x00,0x21,0x81] 254*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 2($9) # encoding: [0x02,0x00,0x28,0x91] 255*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00] 256*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 257*9880d681SAndroid Build Coastguard Worker 258*9880d681SAndroid Build Coastguard Worker ulh $8, 0x8000($9) 259*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00] 260*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 261*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00] 262*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 263*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 264*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 265*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34] 266*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 267*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80] 268*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 269*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 270*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 271*9880d681SAndroid Build Coastguard Worker 272*9880d681SAndroid Build Coastguard Worker ulh $8, -0x8000($9) 273*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $1, -32768($9) # encoding: [0x81,0x21,0x80,0x00] 274*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, -32767($9) # encoding: [0x91,0x28,0x80,0x01] 275*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00] 276*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 277*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $1, -32767($9) # encoding: [0x01,0x80,0x21,0x81] 278*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, -32768($9) # encoding: [0x00,0x80,0x28,0x91] 279*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00] 280*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 281*9880d681SAndroid Build Coastguard Worker 282*9880d681SAndroid Build Coastguard Worker ulh $8, 0x10000($9) 283*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01] 284*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 285*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00] 286*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 287*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 288*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 289*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 290*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 291*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80] 292*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 293*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 294*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 295*9880d681SAndroid Build Coastguard Worker 296*9880d681SAndroid Build Coastguard Worker ulh $8, 0x18888($9) 297*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01] 298*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88] 299*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 300*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00] 301*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 302*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 303*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 304*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 305*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34] 306*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 307*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80] 308*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 309*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 310*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 311*9880d681SAndroid Build Coastguard Worker 312*9880d681SAndroid Build Coastguard Worker ulh $8, -32769($9) 313*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff] 314*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff] 315*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 316*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00] 317*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 318*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 319*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 320*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c] 321*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34] 322*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 323*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80] 324*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 325*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 326*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 327*9880d681SAndroid Build Coastguard Worker 328*9880d681SAndroid Build Coastguard Worker ulh $8, 32767($9) 329*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addiu $1, $zero, 32767 # encoding: [0x24,0x01,0x7f,0xff] 330*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 331*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lb $8, 0($1) # encoding: [0x80,0x28,0x00,0x00] 332*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 333*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 334*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 335*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $1, $zero, 32767 # encoding: [0xff,0x7f,0x01,0x24] 336*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 337*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lb $8, 1($1) # encoding: [0x01,0x00,0x28,0x80] 338*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 339*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 340*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 341*9880d681SAndroid Build Coastguard Worker 342*9880d681SAndroid Build Coastguard Worker# Test ULHU with immediate operand. 343*9880d681SAndroid Build Coastguard Workerulhu_imm: # CHECK-LABEL: ulhu_imm: 344*9880d681SAndroid Build Coastguard Worker ulhu $8, 0 345*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 0($zero) # encoding: [0x90,0x01,0x00,0x00] 346*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 1($zero) # encoding: [0x90,0x08,0x00,0x01] 347*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00] 348*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 349*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 1($zero) # encoding: [0x01,0x00,0x01,0x90] 350*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 0($zero) # encoding: [0x00,0x00,0x08,0x90] 351*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00] 352*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 353*9880d681SAndroid Build Coastguard Worker 354*9880d681SAndroid Build Coastguard Worker ulhu $8, 2 355*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 2($zero) # encoding: [0x90,0x01,0x00,0x02] 356*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 3($zero) # encoding: [0x90,0x08,0x00,0x03] 357*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00] 358*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 359*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 3($zero) # encoding: [0x03,0x00,0x01,0x90] 360*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 2($zero) # encoding: [0x02,0x00,0x08,0x90] 361*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00] 362*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 363*9880d681SAndroid Build Coastguard Worker 364*9880d681SAndroid Build Coastguard Worker ulhu $8, 0x8000 365*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00] 366*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00] 367*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 368*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 369*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 370*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34] 371*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 372*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 373*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 374*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 375*9880d681SAndroid Build Coastguard Worker 376*9880d681SAndroid Build Coastguard Worker ulhu $8, -0x8000 377*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, -32768($zero) # encoding: [0x90,0x01,0x80,0x00] 378*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, -32767($zero) # encoding: [0x90,0x08,0x80,0x01] 379*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00] 380*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 381*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, -32767($zero) # encoding: [0x01,0x80,0x01,0x90] 382*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, -32768($zero) # encoding: [0x00,0x80,0x08,0x90] 383*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00] 384*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 385*9880d681SAndroid Build Coastguard Worker 386*9880d681SAndroid Build Coastguard Worker ulhu $8, 0x10000 387*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01] 388*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00] 389*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 390*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 391*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 392*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 393*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 394*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 395*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 396*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 397*9880d681SAndroid Build Coastguard Worker 398*9880d681SAndroid Build Coastguard Worker ulhu $8, 0x18888 399*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01] 400*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88] 401*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00] 402*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 403*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 404*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 405*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 406*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34] 407*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 408*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 409*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 410*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 411*9880d681SAndroid Build Coastguard Worker 412*9880d681SAndroid Build Coastguard Worker ulhu $8, -32769 413*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff] 414*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff] 415*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00] 416*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 417*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 418*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 419*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c] 420*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34] 421*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 422*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 423*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 424*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 425*9880d681SAndroid Build Coastguard Worker 426*9880d681SAndroid Build Coastguard Worker ulhu $8, 32767 427*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addiu $1, $zero, 32767 # encoding: [0x24,0x01,0x7f,0xff] 428*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00] 429*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 430*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 431*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 432*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $1, $zero, 32767 # encoding: [0xff,0x7f,0x01,0x24] 433*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 434*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 435*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 436*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 437*9880d681SAndroid Build Coastguard Worker 438*9880d681SAndroid Build Coastguard Worker# Test ULHU with immediate offset and a source register operand. 439*9880d681SAndroid Build Coastguard Worker ulhu $8, 0($9) 440*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 0($9) # encoding: [0x91,0x21,0x00,0x00] 441*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 1($9) # encoding: [0x91,0x28,0x00,0x01] 442*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00] 443*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 444*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 1($9) # encoding: [0x01,0x00,0x21,0x91] 445*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 0($9) # encoding: [0x00,0x00,0x28,0x91] 446*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00] 447*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 448*9880d681SAndroid Build Coastguard Worker 449*9880d681SAndroid Build Coastguard Worker ulhu $8, 2($9) 450*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 2($9) # encoding: [0x91,0x21,0x00,0x02] 451*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 3($9) # encoding: [0x91,0x28,0x00,0x03] 452*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00] 453*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 454*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 3($9) # encoding: [0x03,0x00,0x21,0x91] 455*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 2($9) # encoding: [0x02,0x00,0x28,0x91] 456*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00] 457*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 458*9880d681SAndroid Build Coastguard Worker 459*9880d681SAndroid Build Coastguard Worker ulhu $8, 0x8000($9) 460*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00] 461*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 462*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00] 463*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 464*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 465*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 466*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34] 467*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 468*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 469*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 470*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 471*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 472*9880d681SAndroid Build Coastguard Worker 473*9880d681SAndroid Build Coastguard Worker ulhu $8, -0x8000($9) 474*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, -32768($9) # encoding: [0x91,0x21,0x80,0x00] 475*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, -32767($9) # encoding: [0x91,0x28,0x80,0x01] 476*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $1, $1, 8 # encoding: [0x00,0x01,0x0a,0x00] 477*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 478*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, -32767($9) # encoding: [0x01,0x80,0x21,0x91] 479*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, -32768($9) # encoding: [0x00,0x80,0x28,0x91] 480*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $1, $1, 8 # encoding: [0x00,0x0a,0x01,0x00] 481*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 482*9880d681SAndroid Build Coastguard Worker 483*9880d681SAndroid Build Coastguard Worker ulhu $8, 0x10000($9) 484*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01] 485*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 486*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00] 487*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 488*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 489*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 490*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 491*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 492*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 493*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 494*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 495*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 496*9880d681SAndroid Build Coastguard Worker 497*9880d681SAndroid Build Coastguard Worker ulhu $8, 0x18888($9) 498*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01] 499*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88] 500*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 501*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00] 502*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 503*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 504*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 505*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 506*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34] 507*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 508*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 509*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 510*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 511*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 512*9880d681SAndroid Build Coastguard Worker 513*9880d681SAndroid Build Coastguard Worker ulhu $8, -32769($9) 514*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff] 515*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $1, 32767 # encoding: [0x34,0x21,0x7f,0xff] 516*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 517*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00] 518*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 519*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 520*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 521*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c] 522*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 32767 # encoding: [0xff,0x7f,0x21,0x34] 523*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 524*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 525*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 526*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 527*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 528*9880d681SAndroid Build Coastguard Worker 529*9880d681SAndroid Build Coastguard Worker ulhu $8, 32767($9) 530*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addiu $1, $zero, 32767 # encoding: [0x24,0x01,0x7f,0xff] 531*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 532*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $8, 0($1) # encoding: [0x90,0x28,0x00,0x00] 533*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lbu $1, 1($1) # encoding: [0x90,0x21,0x00,0x01] 534*9880d681SAndroid Build Coastguard Worker# CHECK-BE: sll $8, $8, 8 # encoding: [0x00,0x08,0x42,0x00] 535*9880d681SAndroid Build Coastguard Worker# CHECK-BE: or $8, $8, $1 # encoding: [0x01,0x01,0x40,0x25] 536*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $1, $zero, 32767 # encoding: [0xff,0x7f,0x01,0x24] 537*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 538*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 539*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 540*9880d681SAndroid Build Coastguard Worker# CHECK-LE: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 541*9880d681SAndroid Build Coastguard Worker# CHECK-LE: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 542*9880d681SAndroid Build Coastguard Worker 543*9880d681SAndroid Build Coastguard Worker# Test ULW with immediate operand. 544*9880d681SAndroid Build Coastguard Worker ulw $8, 0 545*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 0($zero) # encoding: [0x88,0x08,0x00,0x00] 546*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 3($zero) # encoding: [0x98,0x08,0x00,0x03] 547*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 3($zero) # encoding: [0x03,0x00,0x08,0x88] 548*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 0($zero) # encoding: [0x00,0x00,0x08,0x98] 549*9880d681SAndroid Build Coastguard Worker 550*9880d681SAndroid Build Coastguard Worker ulw $8, 2 551*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 2($zero) # encoding: [0x88,0x08,0x00,0x02] 552*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 5($zero) # encoding: [0x98,0x08,0x00,0x05] 553*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 5($zero) # encoding: [0x05,0x00,0x08,0x88] 554*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 2($zero) # encoding: [0x02,0x00,0x08,0x98] 555*9880d681SAndroid Build Coastguard Worker 556*9880d681SAndroid Build Coastguard Worker ulw $8, 0x8000 557*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00] 558*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00] 559*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03] 560*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34] 561*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 562*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 563*9880d681SAndroid Build Coastguard Worker 564*9880d681SAndroid Build Coastguard Worker ulw $8, -0x8000 565*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, -32768($zero) # encoding: [0x88,0x08,0x80,0x00] 566*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, -32765($zero) # encoding: [0x98,0x08,0x80,0x03] 567*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, -32765($zero) # encoding: [0x03,0x80,0x08,0x88] 568*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, -32768($zero) # encoding: [0x00,0x80,0x08,0x98] 569*9880d681SAndroid Build Coastguard Worker 570*9880d681SAndroid Build Coastguard Worker ulw $8, 0x10000 571*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01] 572*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00] 573*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03] 574*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 575*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 576*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 577*9880d681SAndroid Build Coastguard Worker 578*9880d681SAndroid Build Coastguard Worker ulw $8, 0x18888 579*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01] 580*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88] 581*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00] 582*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03] 583*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 584*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34] 585*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 586*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 587*9880d681SAndroid Build Coastguard Worker 588*9880d681SAndroid Build Coastguard Worker ulw $8, -32771 589*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff] 590*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $1, 32765 # encoding: [0x34,0x21,0x7f,0xfd] 591*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00] 592*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03] 593*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c] 594*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 32765 # encoding: [0xfd,0x7f,0x21,0x34] 595*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 596*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 597*9880d681SAndroid Build Coastguard Worker 598*9880d681SAndroid Build Coastguard Worker ulw $8, 32765 599*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addiu $1, $zero, 32765 # encoding: [0x24,0x01,0x7f,0xfd] 600*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00] 601*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03] 602*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $1, $zero, 32765 # encoding: [0xfd,0x7f,0x01,0x24] 603*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 604*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 605*9880d681SAndroid Build Coastguard Worker 606*9880d681SAndroid Build Coastguard Worker# Test ULW with immediate offset and a source register operand. 607*9880d681SAndroid Build Coastguard Worker ulw $8, 0($9) 608*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 0($9) # encoding: [0x89,0x28,0x00,0x00] 609*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 3($9) # encoding: [0x99,0x28,0x00,0x03] 610*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 3($9) # encoding: [0x03,0x00,0x28,0x89] 611*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 0($9) # encoding: [0x00,0x00,0x28,0x99] 612*9880d681SAndroid Build Coastguard Worker 613*9880d681SAndroid Build Coastguard Worker ulw $8, 2($9) 614*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 2($9) # encoding: [0x89,0x28,0x00,0x02] 615*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 5($9) # encoding: [0x99,0x28,0x00,0x05] 616*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 5($9) # encoding: [0x05,0x00,0x28,0x89] 617*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 2($9) # encoding: [0x02,0x00,0x28,0x99] 618*9880d681SAndroid Build Coastguard Worker 619*9880d681SAndroid Build Coastguard Worker ulw $8, 0x8000($9) 620*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00] 621*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 622*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00] 623*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03] 624*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $zero, 32768 # encoding: [0x00,0x80,0x01,0x34] 625*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 626*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 627*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 628*9880d681SAndroid Build Coastguard Worker 629*9880d681SAndroid Build Coastguard Worker ulw $8, -0x8000($9) 630*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, -32768($9) # encoding: [0x89,0x28,0x80,0x00] 631*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, -32765($9) # encoding: [0x99,0x28,0x80,0x03] 632*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, -32765($9) # encoding: [0x03,0x80,0x28,0x89] 633*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, -32768($9) # encoding: [0x00,0x80,0x28,0x99] 634*9880d681SAndroid Build Coastguard Worker 635*9880d681SAndroid Build Coastguard Worker ulw $8, 0x10000($9) 636*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01] 637*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 638*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00] 639*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03] 640*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 641*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 642*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 643*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 644*9880d681SAndroid Build Coastguard Worker 645*9880d681SAndroid Build Coastguard Worker ulw $8, 0x18888($9) 646*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01] 647*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $1, 34952 # encoding: [0x34,0x21,0x88,0x88] 648*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 649*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00] 650*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03] 651*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 652*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 34952 # encoding: [0x88,0x88,0x21,0x34] 653*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 654*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 655*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 656*9880d681SAndroid Build Coastguard Worker 657*9880d681SAndroid Build Coastguard Worker ulw $8, -32771($9) 658*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lui $1, 65535 # encoding: [0x3c,0x01,0xff,0xff] 659*9880d681SAndroid Build Coastguard Worker# CHECK-BE: ori $1, $1, 32765 # encoding: [0x34,0x21,0x7f,0xfd] 660*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 661*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00] 662*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03] 663*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lui $1, 65535 # encoding: [0xff,0xff,0x01,0x3c] 664*9880d681SAndroid Build Coastguard Worker# CHECK-LE: ori $1, $1, 32765 # encoding: [0xfd,0x7f,0x21,0x34] 665*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 666*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 667*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 668*9880d681SAndroid Build Coastguard Worker 669*9880d681SAndroid Build Coastguard Worker ulw $8, 32765($9) 670*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addiu $1, $zero, 32765 # encoding: [0x24,0x01,0x7f,0xfd] 671*9880d681SAndroid Build Coastguard Worker# CHECK-BE: addu $1, $1, $9 # encoding: [0x00,0x29,0x08,0x21] 672*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwl $8, 0($1) # encoding: [0x88,0x28,0x00,0x00] 673*9880d681SAndroid Build Coastguard Worker# CHECK-BE: lwr $8, 3($1) # encoding: [0x98,0x28,0x00,0x03] 674*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addiu $1, $zero, 32765 # encoding: [0xfd,0x7f,0x01,0x24] 675*9880d681SAndroid Build Coastguard Worker# CHECK-LE: addu $1, $1, $9 # encoding: [0x21,0x08,0x29,0x00] 676*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 677*9880d681SAndroid Build Coastguard Worker# CHECK-LE: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 678*9880d681SAndroid Build Coastguard Worker 679*9880d681SAndroid Build Coastguard Worker1: 680*9880d681SAndroid Build Coastguard Worker add $4, $4, $4 681