1*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -triple=mips64el-unknown-linux -show-encoding -mcpu=mips64r2 | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker# Check that signed negative 32-bit immediates are loaded correctly: 4*9880d681SAndroid Build Coastguard Worker li $10, ~(0x101010) 5*9880d681SAndroid Build Coastguard Worker# CHECK: lui $10, 65519 # encoding: [0xef,0xff,0x0a,0x3c] 6*9880d681SAndroid Build Coastguard Worker# CHECK: ori $10, $10, 61423 # encoding: [0xef,0xef,0x4a,0x35] 7*9880d681SAndroid Build Coastguard Worker# CHECK-NOT: dsll 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker# Test bne with an immediate as the 2nd operand. 10*9880d681SAndroid Build Coastguard Worker bne $2, 0x100010001, 1332 11*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 12*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 13*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 14*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 15*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 16*9880d681SAndroid Build Coastguard Worker# CHECK: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 17*9880d681SAndroid Build Coastguard Worker# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Worker bne $2, 0x1000100010001, 1332 20*9880d681SAndroid Build Coastguard Worker# CHECK: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 21*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 22*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 23*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 24*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 25*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 26*9880d681SAndroid Build Coastguard Worker# CHECK: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 27*9880d681SAndroid Build Coastguard Worker# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Worker bne $2, -0x100010001, 1332 30*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, -2 # encoding: [0xfe,0xff,0x01,0x24] 31*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 32*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 33*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 34*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 35*9880d681SAndroid Build Coastguard Worker# CHECK: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 36*9880d681SAndroid Build Coastguard Worker# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 37*9880d681SAndroid Build Coastguard Worker 38*9880d681SAndroid Build Coastguard Worker bne $2, -0x1000100010001, 1332 39*9880d681SAndroid Build Coastguard Worker# CHECK: lui $1, 65534 # encoding: [0xfe,0xff,0x01,0x3c] 40*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 41*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 42*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 43*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 44*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 45*9880d681SAndroid Build Coastguard Worker# CHECK: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 46*9880d681SAndroid Build Coastguard Worker# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 47*9880d681SAndroid Build Coastguard Worker 48*9880d681SAndroid Build Coastguard Worker# Test beq with an immediate as the 2nd operand. 49*9880d681SAndroid Build Coastguard Worker beq $2, 0x100010001, 1332 50*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 51*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 52*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 53*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 54*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 55*9880d681SAndroid Build Coastguard Worker# CHECK: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 56*9880d681SAndroid Build Coastguard Worker# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 57*9880d681SAndroid Build Coastguard Worker 58*9880d681SAndroid Build Coastguard Worker beq $2, 0x1000100010001, 1332 59*9880d681SAndroid Build Coastguard Worker# CHECK: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 60*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 61*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 62*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 63*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 64*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 65*9880d681SAndroid Build Coastguard Worker# CHECK: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 66*9880d681SAndroid Build Coastguard Worker# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 67*9880d681SAndroid Build Coastguard Worker 68*9880d681SAndroid Build Coastguard Worker beq $2, -0x100010001, 1332 69*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, -2 # encoding: [0xfe,0xff,0x01,0x24] 70*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 71*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 72*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 73*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 74*9880d681SAndroid Build Coastguard Worker# CHECK: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 75*9880d681SAndroid Build Coastguard Worker# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 76*9880d681SAndroid Build Coastguard Worker 77*9880d681SAndroid Build Coastguard Worker beq $2, -0x1000100010001, 1332 78*9880d681SAndroid Build Coastguard Worker# CHECK: lui $1, 65534 # encoding: [0xfe,0xff,0x01,0x3c] 79*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 80*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 81*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 82*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 83*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 84*9880d681SAndroid Build Coastguard Worker# CHECK: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 85*9880d681SAndroid Build Coastguard Worker# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 86*9880d681SAndroid Build Coastguard Worker 87*9880d681SAndroid Build Coastguard Worker# Test one with a symbol in the third operand. 88*9880d681SAndroid Build Coastguard Workersym: 89*9880d681SAndroid Build Coastguard Worker bne $2, 0x100010001, sym 90*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 91*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 92*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 93*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 94*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 95*9880d681SAndroid Build Coastguard Worker# CHECK: bne $2, $1, sym # encoding: [A,A,0x41,0x14] 96*9880d681SAndroid Build Coastguard Worker# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 97*9880d681SAndroid Build Coastguard Worker 98*9880d681SAndroid Build Coastguard Worker# Test ulhu with 64-bit immediate addresses. 99*9880d681SAndroid Build Coastguard Worker ulhu $8, 0x100010001 100*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 101*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 102*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 103*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 104*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 105*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 106*9880d681SAndroid Build Coastguard Worker# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 107*9880d681SAndroid Build Coastguard Worker# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 108*9880d681SAndroid Build Coastguard Worker 109*9880d681SAndroid Build Coastguard Worker ulhu $8, 0x1000100010001 110*9880d681SAndroid Build Coastguard Worker# CHECK: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 111*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 112*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 113*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 114*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 115*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 116*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 117*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 118*9880d681SAndroid Build Coastguard Worker# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 119*9880d681SAndroid Build Coastguard Worker# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 120*9880d681SAndroid Build Coastguard Worker 121*9880d681SAndroid Build Coastguard Worker ulhu $8, -0x100010001 122*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, -2 # encoding: [0xfe,0xff,0x01,0x24] 123*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 124*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 125*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 126*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 127*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 128*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 129*9880d681SAndroid Build Coastguard Worker# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 130*9880d681SAndroid Build Coastguard Worker# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 131*9880d681SAndroid Build Coastguard Worker 132*9880d681SAndroid Build Coastguard Worker ulhu $8, -0x1000100010001 133*9880d681SAndroid Build Coastguard Worker# CHECK: lui $1, 65534 # encoding: [0xfe,0xff,0x01,0x3c] 134*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 135*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 136*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 137*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 138*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 139*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 140*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 141*9880d681SAndroid Build Coastguard Worker# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 142*9880d681SAndroid Build Coastguard Worker# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 143*9880d681SAndroid Build Coastguard Worker 144*9880d681SAndroid Build Coastguard Worker# Test ulhu with source register and 64-bit immediate offset. 145*9880d681SAndroid Build Coastguard Worker ulhu $8, 0x100010001($9) 146*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 147*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 148*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 149*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 150*9880d681SAndroid Build Coastguard Worker# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 151*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 152*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 153*9880d681SAndroid Build Coastguard Worker# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 154*9880d681SAndroid Build Coastguard Worker# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 155*9880d681SAndroid Build Coastguard Worker 156*9880d681SAndroid Build Coastguard Worker ulhu $8, 0x1000100010001($9) 157*9880d681SAndroid Build Coastguard Worker# CHECK: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 158*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 159*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 160*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 161*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 162*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 163*9880d681SAndroid Build Coastguard Worker# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 164*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 165*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 166*9880d681SAndroid Build Coastguard Worker# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 167*9880d681SAndroid Build Coastguard Worker# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 168*9880d681SAndroid Build Coastguard Worker 169*9880d681SAndroid Build Coastguard Worker ulhu $8, -0x100010001($9) 170*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, -2 # encoding: [0xfe,0xff,0x01,0x24] 171*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 172*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 173*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 174*9880d681SAndroid Build Coastguard Worker# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 175*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 176*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 177*9880d681SAndroid Build Coastguard Worker# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 178*9880d681SAndroid Build Coastguard Worker# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 179*9880d681SAndroid Build Coastguard Worker 180*9880d681SAndroid Build Coastguard Worker ulhu $8, -0x1000100010001($9) 181*9880d681SAndroid Build Coastguard Worker# CHECK: lui $1, 65534 # encoding: [0xfe,0xff,0x01,0x3c] 182*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 183*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 184*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 185*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 186*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 187*9880d681SAndroid Build Coastguard Worker# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 188*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 189*9880d681SAndroid Build Coastguard Worker# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 190*9880d681SAndroid Build Coastguard Worker# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 191*9880d681SAndroid Build Coastguard Worker# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 192*9880d681SAndroid Build Coastguard Worker 193*9880d681SAndroid Build Coastguard Worker# Test ulw with 64-bit immediate addresses. 194*9880d681SAndroid Build Coastguard Worker ulw $8, 0x100010001 195*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 196*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 197*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 198*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 199*9880d681SAndroid Build Coastguard Worker# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 200*9880d681SAndroid Build Coastguard Worker# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 201*9880d681SAndroid Build Coastguard Worker 202*9880d681SAndroid Build Coastguard Worker ulw $8, 0x1000100010001 203*9880d681SAndroid Build Coastguard Worker# CHECK: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 204*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 205*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 206*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 207*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 208*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 209*9880d681SAndroid Build Coastguard Worker# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 210*9880d681SAndroid Build Coastguard Worker# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 211*9880d681SAndroid Build Coastguard Worker 212*9880d681SAndroid Build Coastguard Worker ulw $8, -0x100010001 213*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, -2 # encoding: [0xfe,0xff,0x01,0x24] 214*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 215*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 216*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 217*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 218*9880d681SAndroid Build Coastguard Worker# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 219*9880d681SAndroid Build Coastguard Worker# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 220*9880d681SAndroid Build Coastguard Worker 221*9880d681SAndroid Build Coastguard Worker ulw $8, -0x1000100010001 222*9880d681SAndroid Build Coastguard Worker# CHECK: lui $1, 65534 # encoding: [0xfe,0xff,0x01,0x3c] 223*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 224*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 225*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 226*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 227*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 228*9880d681SAndroid Build Coastguard Worker# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 229*9880d681SAndroid Build Coastguard Worker# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 230*9880d681SAndroid Build Coastguard Worker 231*9880d681SAndroid Build Coastguard Worker# Test ulw with source register and 64-bit immediate offset. 232*9880d681SAndroid Build Coastguard Worker ulw $8, 0x100010001($9) 233*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 234*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 235*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 236*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 237*9880d681SAndroid Build Coastguard Worker# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 238*9880d681SAndroid Build Coastguard Worker# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 239*9880d681SAndroid Build Coastguard Worker# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 240*9880d681SAndroid Build Coastguard Worker 241*9880d681SAndroid Build Coastguard Worker ulw $8, 0x1000100010001($9) 242*9880d681SAndroid Build Coastguard Worker# CHECK: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 243*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 244*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 245*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 246*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 247*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 248*9880d681SAndroid Build Coastguard Worker# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 249*9880d681SAndroid Build Coastguard Worker# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 250*9880d681SAndroid Build Coastguard Worker# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 251*9880d681SAndroid Build Coastguard Worker 252*9880d681SAndroid Build Coastguard Worker ulw $8, -0x100010001($9) 253*9880d681SAndroid Build Coastguard Worker# CHECK: addiu $1, $zero, -2 # encoding: [0xfe,0xff,0x01,0x24] 254*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 255*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 256*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 257*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 258*9880d681SAndroid Build Coastguard Worker# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 259*9880d681SAndroid Build Coastguard Worker# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 260*9880d681SAndroid Build Coastguard Worker# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 261*9880d681SAndroid Build Coastguard Worker 262*9880d681SAndroid Build Coastguard Worker ulw $8, -0x1000100010001($9) 263*9880d681SAndroid Build Coastguard Worker# CHECK: lui $1, 65534 # encoding: [0xfe,0xff,0x01,0x3c] 264*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 265*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 266*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 267*9880d681SAndroid Build Coastguard Worker# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 268*9880d681SAndroid Build Coastguard Worker# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 269*9880d681SAndroid Build Coastguard Worker# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 270*9880d681SAndroid Build Coastguard Worker# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 271*9880d681SAndroid Build Coastguard Worker# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 272