1# RUN: llvm-mc %s -triple=mips64el-unknown-linux -show-encoding -mcpu=mips64r2 | FileCheck %s 2 3# Check that signed negative 32-bit immediates are loaded correctly: 4 li $10, ~(0x101010) 5# CHECK: lui $10, 65519 # encoding: [0xef,0xff,0x0a,0x3c] 6# CHECK: ori $10, $10, 61423 # encoding: [0xef,0xef,0x4a,0x35] 7# CHECK-NOT: dsll 8 9# Test bne with an immediate as the 2nd operand. 10 bne $2, 0x100010001, 1332 11# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 12# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 13# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 14# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 15# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 16# CHECK: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 17# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 18 19 bne $2, 0x1000100010001, 1332 20# CHECK: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 21# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 22# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 23# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 24# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 25# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 26# CHECK: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 27# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 28 29 bne $2, -0x100010001, 1332 30# CHECK: addiu $1, $zero, -2 # encoding: [0xfe,0xff,0x01,0x24] 31# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 32# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 33# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 34# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 35# CHECK: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 36# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 37 38 bne $2, -0x1000100010001, 1332 39# CHECK: lui $1, 65534 # encoding: [0xfe,0xff,0x01,0x3c] 40# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 41# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 42# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 43# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 44# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 45# CHECK: bne $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x14] 46# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 47 48# Test beq with an immediate as the 2nd operand. 49 beq $2, 0x100010001, 1332 50# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 51# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 52# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 53# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 54# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 55# CHECK: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 56# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 57 58 beq $2, 0x1000100010001, 1332 59# CHECK: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 60# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 61# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 62# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 63# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 64# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 65# CHECK: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 66# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 67 68 beq $2, -0x100010001, 1332 69# CHECK: addiu $1, $zero, -2 # encoding: [0xfe,0xff,0x01,0x24] 70# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 71# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 72# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 73# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 74# CHECK: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 75# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 76 77 beq $2, -0x1000100010001, 1332 78# CHECK: lui $1, 65534 # encoding: [0xfe,0xff,0x01,0x3c] 79# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 80# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 81# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 82# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 83# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 84# CHECK: beq $2, $1, 1332 # encoding: [0x4d,0x01,0x41,0x10] 85# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 86 87# Test one with a symbol in the third operand. 88sym: 89 bne $2, 0x100010001, sym 90# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 91# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 92# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 93# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 94# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 95# CHECK: bne $2, $1, sym # encoding: [A,A,0x41,0x14] 96# CHECK: nop # encoding: [0x00,0x00,0x00,0x00] 97 98# Test ulhu with 64-bit immediate addresses. 99 ulhu $8, 0x100010001 100# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 101# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 102# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 103# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 104# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 105# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 106# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 107# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 108 109 ulhu $8, 0x1000100010001 110# CHECK: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 111# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 112# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 113# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 114# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 115# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 116# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 117# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 118# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 119# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 120 121 ulhu $8, -0x100010001 122# CHECK: addiu $1, $zero, -2 # encoding: [0xfe,0xff,0x01,0x24] 123# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 124# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 125# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 126# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 127# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 128# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 129# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 130# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 131 132 ulhu $8, -0x1000100010001 133# CHECK: lui $1, 65534 # encoding: [0xfe,0xff,0x01,0x3c] 134# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 135# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 136# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 137# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 138# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 139# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 140# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 141# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 142# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 143 144# Test ulhu with source register and 64-bit immediate offset. 145 ulhu $8, 0x100010001($9) 146# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 147# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 148# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 149# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 150# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 151# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 152# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 153# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 154# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 155 156 ulhu $8, 0x1000100010001($9) 157# CHECK: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 158# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 159# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 160# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 161# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 162# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 163# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 164# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 165# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 166# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 167# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 168 169 ulhu $8, -0x100010001($9) 170# CHECK: addiu $1, $zero, -2 # encoding: [0xfe,0xff,0x01,0x24] 171# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 172# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 173# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 174# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 175# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 176# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 177# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 178# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 179 180 ulhu $8, -0x1000100010001($9) 181# CHECK: lui $1, 65534 # encoding: [0xfe,0xff,0x01,0x3c] 182# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 183# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 184# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 185# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 186# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 187# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 188# CHECK: lbu $8, 1($1) # encoding: [0x01,0x00,0x28,0x90] 189# CHECK: lbu $1, 0($1) # encoding: [0x00,0x00,0x21,0x90] 190# CHECK: sll $8, $8, 8 # encoding: [0x00,0x42,0x08,0x00] 191# CHECK: or $8, $8, $1 # encoding: [0x25,0x40,0x01,0x01] 192 193# Test ulw with 64-bit immediate addresses. 194 ulw $8, 0x100010001 195# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 196# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 197# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 198# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 199# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 200# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 201 202 ulw $8, 0x1000100010001 203# CHECK: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 204# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 205# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 206# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 207# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 208# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 209# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 210# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 211 212 ulw $8, -0x100010001 213# CHECK: addiu $1, $zero, -2 # encoding: [0xfe,0xff,0x01,0x24] 214# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 215# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 216# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 217# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 218# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 219# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 220 221 ulw $8, -0x1000100010001 222# CHECK: lui $1, 65534 # encoding: [0xfe,0xff,0x01,0x3c] 223# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 224# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 225# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 226# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 227# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 228# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 229# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 230 231# Test ulw with source register and 64-bit immediate offset. 232 ulw $8, 0x100010001($9) 233# CHECK: addiu $1, $zero, 1 # encoding: [0x01,0x00,0x01,0x24] 234# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 235# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 236# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 237# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 238# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 239# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 240 241 ulw $8, 0x1000100010001($9) 242# CHECK: lui $1, 1 # encoding: [0x01,0x00,0x01,0x3c] 243# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 244# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 245# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 246# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 247# CHECK: ori $1, $1, 1 # encoding: [0x01,0x00,0x21,0x34] 248# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 249# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 250# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 251 252 ulw $8, -0x100010001($9) 253# CHECK: addiu $1, $zero, -2 # encoding: [0xfe,0xff,0x01,0x24] 254# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 255# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 256# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 257# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 258# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 259# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 260# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 261 262 ulw $8, -0x1000100010001($9) 263# CHECK: lui $1, 65534 # encoding: [0xfe,0xff,0x01,0x3c] 264# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 265# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 266# CHECK: ori $1, $1, 65534 # encoding: [0xfe,0xff,0x21,0x34] 267# CHECK: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00] 268# CHECK: ori $1, $1, 65535 # encoding: [0xff,0xff,0x21,0x34] 269# CHECK: daddu $1, $1, $9 # encoding: [0x2d,0x08,0x29,0x00] 270# CHECK: lwl $8, 3($1) # encoding: [0x03,0x00,0x28,0x88] 271# CHECK: lwr $8, 0($1) # encoding: [0x00,0x00,0x28,0x98] 272 273# Test lb/sb/ld/sd/lld with offsets exceeding 16-bits in size. 274 275 ld $4, 0x8000 276# CHECK: lui $4, 1 277# CHECK-NEXT: ld $4, -32768($4) 278 279 ld $4, 0x20008($3) 280# CHECK: lui $4, 2 281# CHECK-NEXT: addu $4, $4, $3 282# CHECK-NEXT: ld $4, 8($4) 283 284 ld $4,0x100010004 285# CHECK: addiu $4, $zero, 1 286# CHECK-NEXT: dsll $4, $4, 16 287# CHECK-NEXT: ori $4, $4, 1 288# CHECK-NEXT: dsll $4, $4, 16 289# CHECK-NEXT: ld $4, 4($4) 290 291 ld $4,0x1800180018004 292# CHECK: lui $4, 1 293# CHECK-NEXT: ori $4, $4, 32769 294# CHECK-NEXT: dsll $4, $4, 16 295# CHECK-NEXT: ori $4, $4, 32770 296# CHECK-NEXT: dsll $4, $4, 16 297# CHECK-NEXT: ld $4, -32764($4) 298 299 ld $4,0x1800180018004($3) 300# CHECK: lui $4, 1 301# CHECK-NEXT: ori $4, $4, 32769 302# CHECK-NEXT: dsll $4, $4, 16 303# CHECK-NEXT: ori $4, $4, 32770 304# CHECK-NEXT: dsll $4, $4, 16 305# CHECK-NEXT: daddu $4, $4, $3 306# CHECK-NEXT: ld $4, -32764($4) 307 308 sd $4, 0x8000 309# CHECK: lui $1, 1 310# CHECK-NEXT: sd $4, -32768($1) 311 312 sd $4, 0x20008($3) 313# CHECK: lui $1, 2 314# CHECK-NEXT: addu $1, $1, $3 315# CHECK-NEXT: sd $4, 8($1) 316 317 sd $4,0x100010004 318# CHECK: addiu $1, $zero, 1 319# CHECK-NEXT: dsll $1, $1, 16 320# CHECK-NEXT: ori $1, $1, 1 321# CHECK-NEXT: dsll $1, $1, 16 322# CHECK-NEXT: sd $4, 4($1) 323 324 sd $4,0x1800180018004 325# CHECK: lui $1, 1 326# CHECK-NEXT: ori $1, $1, 32769 327# CHECK-NEXT: dsll $1, $1, 16 328# CHECK-NEXT: ori $1, $1, 32770 329# CHECK-NEXT: dsll $1, $1, 16 330# CHECK-NEXT: sd $4, -32764($1) 331 332 sd $4,0x1800180018004($3) 333# CHECK: lui $1, 1 334# CHECK-NEXT: ori $1, $1, 32769 335# CHECK-NEXT: dsll $1, $1, 16 336# CHECK-NEXT: ori $1, $1, 32770 337# CHECK-NEXT: dsll $1, $1, 16 338# CHECK-NEXT: daddu $1, $1, $3 339# CHECK-NEXT: sd $4, -32764($1) 340 341 lld $4, 0x8000 342# CHECK: lui $4, 1 343# CHECK-NEXT: lld $4, -32768($4) 344 345 lld $4, 0x20008($3) 346# CHECK: lui $4, 2 347# CHECK-NEXT: addu $4, $4, $3 348# CHECK-NEXT: lld $4, 8($4) 349 350 lld $4,0x100010004 351# CHECK: addiu $4, $zero, 1 352# CHECK-NEXT: dsll $4, $4, 16 353# CHECK-NEXT: ori $4, $4, 1 354# CHECK-NEXT: dsll $4, $4, 16 355# CHECK-NEXT: lld $4, 4($4) 356 357 lld $4,0x1800180018004 358# CHECK: lui $4, 1 359# CHECK-NEXT: ori $4, $4, 32769 360# CHECK-NEXT: dsll $4, $4, 16 361# CHECK-NEXT: ori $4, $4, 32770 362# CHECK-NEXT: dsll $4, $4, 16 363# CHECK-NEXT: lld $4, -32764($4) 364 365 lld $4,0x1800180018004($3) 366# CHECK: lui $4, 1 367# CHECK-NEXT: ori $4, $4, 32769 368# CHECK-NEXT: dsll $4, $4, 16 369# CHECK-NEXT: ori $4, $4, 32770 370# CHECK-NEXT: dsll $4, $4, 16 371# CHECK-NEXT: daddu $4, $4, $3 372# CHECK-NEXT: lld $4, -32764($4) 373 374 lb $4,0x100010004 375# CHECK: addiu $4, $zero, 1 376# CHECK-NEXT: dsll $4, $4, 16 377# CHECK-NEXT: ori $4, $4, 1 378# CHECK-NEXT: dsll $4, $4, 16 379# CHECK-NEXT: lb $4, 4($4) 380 381 lb $4,0x1800180018004 382# CHECK: lui $4, 1 383# CHECK-NEXT: ori $4, $4, 32769 384# CHECK-NEXT: dsll $4, $4, 16 385# CHECK-NEXT: ori $4, $4, 32770 386# CHECK-NEXT: dsll $4, $4, 16 387# CHECK-NEXT: lb $4, -32764($4) 388 389 lb $4,0x1800180018004($3) 390# CHECK: lui $4, 1 391# CHECK-NEXT: ori $4, $4, 32769 392# CHECK-NEXT: dsll $4, $4, 16 393# CHECK-NEXT: ori $4, $4, 32770 394# CHECK-NEXT: dsll $4, $4, 16 395# CHECK-NEXT: daddu $4, $4, $3 396# CHECK-NEXT: lb $4, -32764($4) 397 398 sb $4,0x100010004 399# CHECK: addiu $1, $zero, 1 400# CHECK-NEXT: dsll $1, $1, 16 401# CHECK-NEXT: ori $1, $1, 1 402# CHECK-NEXT: dsll $1, $1, 16 403# CHECK-NEXT: sb $4, 4($1) 404 405 sb $4,0x1800180018004 406# CHECK: lui $1, 1 407# CHECK-NEXT: ori $1, $1, 32769 408# CHECK-NEXT: dsll $1, $1, 16 409# CHECK-NEXT: ori $1, $1, 32770 410# CHECK-NEXT: dsll $1, $1, 16 411# CHECK-NEXT: sb $4, -32764($1) 412 413 sb $4,0x1800180018004($3) 414# CHECK: lui $1, 1 415# CHECK-NEXT: ori $1, $1, 32769 416# CHECK-NEXT: dsll $1, $1, 16 417# CHECK-NEXT: ori $1, $1, 32770 418# CHECK-NEXT: dsll $1, $1, 16 419# CHECK-NEXT: daddu $1, $1, $3 420# CHECK-NEXT: sb $4, -32764($1) 421 422 lh $4,0x100010004 423# CHECK: addiu $4, $zero, 1 424# CHECK-NEXT: dsll $4, $4, 16 425# CHECK-NEXT: ori $4, $4, 1 426# CHECK-NEXT: dsll $4, $4, 16 427# CHECK-NEXT: lh $4, 4($4) 428 429 lh $4,0x1800180018004 430# CHECK: lui $4, 1 431# CHECK-NEXT: ori $4, $4, 32769 432# CHECK-NEXT: dsll $4, $4, 16 433# CHECK-NEXT: ori $4, $4, 32770 434# CHECK-NEXT: dsll $4, $4, 16 435# CHECK-NEXT: lh $4, -32764($4) 436 437 lh $4,0x1800180018004($3) 438# CHECK: lui $4, 1 439# CHECK-NEXT: ori $4, $4, 32769 440# CHECK-NEXT: dsll $4, $4, 16 441# CHECK-NEXT: ori $4, $4, 32770 442# CHECK-NEXT: dsll $4, $4, 16 443# CHECK-NEXT: daddu $4, $4, $3 444# CHECK-NEXT: lh $4, -32764($4) 445 446 lhu $4,0x100010004 447# CHECK: addiu $4, $zero, 1 448# CHECK-NEXT: dsll $4, $4, 16 449# CHECK-NEXT: ori $4, $4, 1 450# CHECK-NEXT: dsll $4, $4, 16 451# CHECK-NEXT: lhu $4, 4($4) 452 453 lhu $4,0x1800180018004 454# CHECK: lui $4, 1 455# CHECK-NEXT: ori $4, $4, 32769 456# CHECK-NEXT: dsll $4, $4, 16 457# CHECK-NEXT: ori $4, $4, 32770 458# CHECK-NEXT: dsll $4, $4, 16 459# CHECK-NEXT: lhu $4, -32764($4) 460 461 lhu $4,0x1800180018004($3) 462# CHECK: lui $4, 1 463# CHECK-NEXT: ori $4, $4, 32769 464# CHECK-NEXT: dsll $4, $4, 16 465# CHECK-NEXT: ori $4, $4, 32770 466# CHECK-NEXT: dsll $4, $4, 16 467# CHECK-NEXT: daddu $4, $4, $3 468# CHECK-NEXT: lhu $4, -32764($4) 469