Index: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp =================================================================== --- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -2392,9 +2392,9 @@ : MER_Success; } return MER_NotAMacro; - case Mips::ANDi: case Mips::ANDi_MM: - case Mips::ORi: case Mips::ORi_MM: - case Mips::XORi: case Mips::XORi_MM: + case Mips::ANDi: case Mips::ANDi_MM: case Mips::ANDi64: + case Mips::ORi: case Mips::ORi_MM: case Mips::ORi64: + case Mips::XORi: case Mips::XORi_MM: case Mips::XORi64: if ((Inst.getNumOperands() == 3) && Inst.getOperand(0).isReg() && Inst.getOperand(1).isReg() && Inst.getOperand(2).isImm()) { int64_t ImmValue = Inst.getOperand(2).getImm(); @@ -2581,7 +2581,6 @@ uint16_t Bits31To16 = (ImmValue >> 16) & 0xffff; uint16_t Bits15To0 = ImmValue & 0xffff; - if (!Is32BitImm && !isInt<32>(ImmValue)) { // Traditional behaviour seems to special case this particular value. It's // not clear why other masks are handled differently. @@ -3805,7 +3804,7 @@ unsigned SrcReg = Inst.getOperand(1).getReg(); int64_t ImmValue = Inst.getOperand(2).getImm(); - bool Is32Bit = isInt<32>(ImmValue) || isUInt<32>(ImmValue); + bool Is32Bit = isInt<32>(ImmValue) || (!isGP64bit() && isUInt<32>(ImmValue)); unsigned FinalOpcode = Inst.getOpcode(); @@ -3866,6 +3865,15 @@ case Mips::XORi_MM: FinalOpcode = Mips::XOR_MM; break; + case Mips::ANDi64: + FinalOpcode = Mips::AND64; + break; + case Mips::ORi64: + FinalOpcode = Mips::OR64; + break; + case Mips::XORi64: + FinalOpcode = Mips::XOR64; + break; } if (FinalDstReg == Mips::NoRegister) Index: llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td =================================================================== --- llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td +++ llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td @@ -707,6 +707,15 @@ def : MipsInstAlias<"daddu $rs, $imm", (DADDiu GPR64Opnd:$rs, GPR64Opnd:$rs, simm16_64:$imm), 0>, ISA_MIPS3; + + defm : OneOrTwoOperandMacroImmediateAlias<"and", ANDi64, GPR64Opnd, imm64>, + GPR_64; + + defm : OneOrTwoOperandMacroImmediateAlias<"or", ORi64, GPR64Opnd, imm64>, + GPR_64; + + defm : OneOrTwoOperandMacroImmediateAlias<"xor", XORi64, GPR64Opnd, imm64>, + GPR_64; } def : MipsInstAlias<"dsll $rd, $rt, $rs", (DSLLV GPR64Opnd:$rd, GPR64Opnd:$rt, GPR32Opnd:$rs), 0>, Index: llvm/trunk/lib/Target/Mips/MipsInstrInfo.td =================================================================== --- llvm/trunk/lib/Target/Mips/MipsInstrInfo.td +++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.td @@ -2322,15 +2322,17 @@ //===----------------------------------------------------------------------===// multiclass OneOrTwoOperandMacroImmediateAlias { + Instruction Opcode, + RegisterOperand RO = GPR32Opnd, + Operand Imm = simm32_relaxed> { def : MipsInstAlias; + (Opcode RO:$rs, + RO:$rt, + Imm:$imm), 0>; def : MipsInstAlias; + (Opcode RO:$rs, + RO:$rs, + Imm:$imm), 0>; } def : MipsInstAlias<"move $dst, $src", @@ -2384,11 +2386,11 @@ defm : OneOrTwoOperandMacroImmediateAlias<"addu", ADDiu>; - defm : OneOrTwoOperandMacroImmediateAlias<"and", ANDi>; + defm : OneOrTwoOperandMacroImmediateAlias<"and", ANDi>, GPR_32; - defm : OneOrTwoOperandMacroImmediateAlias<"or", ORi>; + defm : OneOrTwoOperandMacroImmediateAlias<"or", ORi>, GPR_32; - defm : OneOrTwoOperandMacroImmediateAlias<"xor", XORi>; + defm : OneOrTwoOperandMacroImmediateAlias<"xor", XORi>, GPR_32; defm : OneOrTwoOperandMacroImmediateAlias<"slt", SLTi>; Index: llvm/trunk/test/MC/Mips/mips64-instalias-imm-expanding-broken.s =================================================================== --- llvm/trunk/test/MC/Mips/mips64-instalias-imm-expanding-broken.s +++ llvm/trunk/test/MC/Mips/mips64-instalias-imm-expanding-broken.s @@ -0,0 +1,106 @@ +# RUN: llvm-mc -triple mips64el-unknown-linux -show-encoding -print-imm-hex %s | FileCheck %s +# XFAIL: * + .text +text_label: +# CHECK: text_label: + nor $4, $5, 0 +# CHECK: addiu $4, $zero, 0x0 # encoding: [0x00,0x00,0x04,0x24] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, 1 +# CHECK-NEXT: addiu $4, $zero, 0x1 # encoding: [0x01,0x00,0x04,0x24] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, 0x8000 +# CHECK-NEXT: ori $4, $zero, 0x8000 # encoding: [0x00,0x80,0x04,0x34] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, -0x8000 +# CHECK-NEXT: addiu $4, $zero, -0x8000 # encoding: [0x00,0x80,0x04,0x24] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, 0x10000 +# CHECK-NEXT: lui $4, 0x1 # encoding: [0x01,0x00,0x04,0x3c] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, 0x1a5a5 +# CHECK-NEXT: lui $4, 0x1 # encoding: [0x01,0x00,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0xa5a5 # encoding: [0xa5,0xa5,0x84,0x34] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, 0xFFFFFFFF +# CHECK-NEXT: lui $4, 0xffff # encoding: [0xff,0xff,0x04,0x3c] +# CHECK-NEXT: dsrl32 $4, $4, 0x0 # encoding: [0x3e,0x20,0x04,0x00] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, 0xF0000000 +# CHECK-NEXT: ori $4, $zero, 0xf000 # encoding: [0x00,0xf0,0x04,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, 0x7FFFFFFF +# CHECK-NEXT: lui $4, 0x7fff # encoding: [0xff,0x7f,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, 0x7FFFFFFFFFFFFFFF +# FIXME: this is awfully inefficient... +# CHECK-NEXT: lui $4, 0x7fff # encoding: [0xff,0x7f,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, 0xFFFFFFFFFFFFFFFF +# CHECK-NEXT: addiu $4, $zero, -0x1 # encoding: [0xff,0xff,0x04,0x24] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, 0xF000000000000000 +# CHECK-NEXT: ori $4, $zero, 0xf000 # encoding: [0x00,0xf0,0x04,0x34] +# CHECK-NEXT: dsll $4, $4, 0x30 # encoding: [0x3c,0x24,0x04,0x00] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, ~(0xf0000000|0x0f000000|0x000000f0) +# CHECK-NEXT: addiu $4, $zero, -0x1 # encoding: [0xff,0xff,0x04,0x24] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xff # encoding: [0xff,0x00,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xff0f # encoding: [0x0f,0xff,0x84,0x34] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + nor $4, $5, 0xff00ff00 +# CHECK-NEXT: ori $4, $zero, 0xff00 # encoding: [0x00,0xff,0x04,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xff00 # encoding: [0x00,0xff,0x84,0x34] +# CHECK-NEXT: nor $4, $4, $5 # encoding: [0x27,0x20,0x85,0x00] + + + slt $4, $5, -0x80000000 +# CHECK: lui $4, 0x8000 # encoding: [0x00,0x80,0x04,0x3c] +# CHECK-NEXT: slt $4, $4, $5 # encoding: [0x2a,0x20,0x85,0x00] + slt $4, $5, -0x8001 +# CHECK-NEXT: lui $4, 0xffff # encoding: [0xff,0xff,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0x7fff # encoding: [0xff,0x7f,0x84,0x34] +# CHECK-NEXT: slt $4, $4, $5 # encoding: [0x2a,0x20,0x85,0x00] + slt $4, $5, -0x8000 +# CHECK-NEXT: slti $4, $5, -0x8000 # encoding: [0x00,0x80,0xa4,0x28] + slt $4, $5, 0 +# CHECK-NEXT: slti $4, $5, 0x0 # encoding: [0x00,0x00,0xa4,0x28] + slt $4, $5, 0xFFFF +# CHECK-NEXT: ori $4, $zero, 0xffff # encoding: [0xff,0xff,0x04,0x34] +# CHECK-NEXT: slt $4, $4, $5 # encoding: [0x2a,0x20,0x85,0x00] + slt $4, $5, 0x10000 +# CHECK-NEXT: lui $4, 0x1 # encoding: [0x01,0x00,0x04,0x3c] +# CHECK-NEXT: slt $4, $4, $5 # encoding: [0x2a,0x20,0x85,0x00] + slt $4, $5, 0xFFFFFFFF +# CHECK-NOT: slti $4, $5, -0x1 # encoding: [0xff,0xff,0xa4,0x28] + + sltu $4, $5, -0x80000000 +# CHECK: lui $4, 0x8000 # encoding: [0x00,0x80,0x04,0x3c] +# CHECK-NEXT: sltu $4, $4, $5 # encoding: [0x2b,0x20,0x85,0x00] + sltu $4, $5, -0x8001 +# CHECK-NEXT: lui $4, 0xffff # encoding: [0xff,0xff,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0x7fff # encoding: [0xff,0x7f,0x84,0x34] +# CHECK-NEXT: sltu $4, $4, $5 # encoding: [0x2b,0x20,0x85,0x00] + sltu $4, $5, -0x8000 +# CHECK-NEXT: sltiu $4, $5, -0x8000 # encoding: [0x00,0x80,0xa4,0x2c] + sltu $4, $5, 0 +# CHECK-NEXT: sltiu $4, $5, 0x0 # encoding: [0x00,0x00,0xa4,0x2c] + sltu $4, $5, 0xFFFF +# CHECK-NEXT: ori $4, $zero, 0xffff # encoding: [0xff,0xff,0x04,0x34] +# CHECK-NEXT: sltu $4, $4, $5 # encoding: [0x2b,0x20,0x85,0x00] + sltu $4, $5, 0x10000 +# CHECK-NEXT: lui $4, 0x1 # encoding: [0x01,0x00,0x04,0x3c] +# CHECK-NEXT: sltu $4, $4, $5 # encoding: [0x2b,0x20,0x85,0x00] +# FIXME: should this be sign extended or not??? + sltu $4, $5, 0xFFFFFFFF +# CHECK-NOT: sltiu $4, $5, -0x1 # encoding: [0xff,0xff,0xa4,0x2c] Index: llvm/trunk/test/MC/Mips/mips64-instalias-imm-expanding.s =================================================================== --- llvm/trunk/test/MC/Mips/mips64-instalias-imm-expanding.s +++ llvm/trunk/test/MC/Mips/mips64-instalias-imm-expanding.s @@ -0,0 +1,415 @@ +# RUN: llvm-mc -triple mips64el-unknown-linux -show-encoding -print-imm-hex %s | FileCheck %s + + .text +text_label: +# CHECK: text_label: + add $4, -0x80000000 +# CHECK-NEXT: lui $1, 0x8000 # encoding: [0x00,0x80,0x01,0x3c] +# CHECK-NEXT: add $4, $4, $1 # encoding: [0x20,0x20,0x81,0x00] + add $4, -0x8001 +# CHECK-NEXT: lui $1, 0xffff # encoding: [0xff,0xff,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0x7fff # encoding: [0xff,0x7f,0x21,0x34] +# CHECK-NEXT: add $4, $4, $1 # encoding: [0x20,0x20,0x81,0x00] + add $4, -0x8000 +# CHECK-NEXT: addi $4, $4, -0x8000 # encoding: [0x00,0x80,0x84,0x20] + add $4, 0 +# CHECK-NEXT: addi $4, $4, 0x0 # encoding: [0x00,0x00,0x84,0x20] + add $4, 0xFFFF +# CHECK-NEXT: ori $1, $zero, 0xffff # encoding: [0xff,0xff,0x01,0x34] +# CHECK-NEXT: add $4, $4, $1 # encoding: [0x20,0x20,0x81,0x00] + add $4, 0x10000 +# CHECK-NEXT: lui $1, 0x1 # encoding: [0x01,0x00,0x01,0x3c] +# CHECK-NEXT: add $4, $4, $1 # encoding: [0x20,0x20,0x81,0x00] + add $4, 0xFFFFFFFF # This should be sign-extended because it's a 32-bit add +# CHECK-NEXT: addi $4, $4, -0x1 # encoding: [0xff,0xff,0x84,0x20] + add $4, ~(0xf0000000|0x0f000000|0x000000f0) +# CHECK-NEXT: lui $1, 0xff # encoding: [0xff,0x00,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0xff0f # encoding: [0x0f,0xff,0x21,0x34] +# CHECK-NEXT: add $4, $4, $1 # encoding: [0x20,0x20,0x81,0x00] + + add $4, $5, -0x80000000 +# CHECK: lui $4, 0x8000 # encoding: [0x00,0x80,0x04,0x3c] +# CHECK-NEXT: add $4, $4, $5 # encoding: [0x20,0x20,0x85,0x00] + add $4, $5, -0x8001 +# CHECK-NEXT: lui $4, 0xffff # encoding: [0xff,0xff,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0x7fff # encoding: [0xff,0x7f,0x84,0x34] +# CHECK-NEXT: add $4, $4, $5 # encoding: [0x20,0x20,0x85,0x00] + add $4, $5, -0x8000 +# CHECK-NEXT: addi $4, $5, -0x8000 # encoding: [0x00,0x80,0xa4,0x20] + add $4, $5, 0 +# CHECK-NEXT: addi $4, $5, 0x0 # encoding: [0x00,0x00,0xa4,0x20] + add $4, $5, 0xFFFF +# CHECK-NEXT: ori $4, $zero, 0xffff # encoding: [0xff,0xff,0x04,0x34] +# CHECK-NEXT: add $4, $4, $5 # encoding: [0x20,0x20,0x85,0x00] + add $4, $5, 0x10000 +# CHECK-NEXT: lui $4, 0x1 # encoding: [0x01,0x00,0x04,0x3c] +# CHECK-NEXT: add $4, $4, $5 # encoding: [0x20,0x20,0x85,0x00] + add $4, $5, 0xFFFFFFFF # This should be sign-extended because it's a 32-bit addi +# CHECK-NEXT: addi $4, $5, -0x1 # encoding: [0xff,0xff,0xa4,0x20] + add $4, $5, ~(0xf0000000|0x0f000000|0x000000f0) +# CHECK-NEXT: lui $4, 0xff # encoding: [0xff,0x00,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0xff0f # encoding: [0x0f,0xff,0x84,0x34] +# CHECK-NEXT: add $4, $4, $5 # encoding: [0x20,0x20,0x85,0x00] + + + addu $4, -0x80000000 +# CHECK: lui $1, 0x8000 # encoding: [0x00,0x80,0x01,0x3c] +# CHECK-NEXT: addu $4, $4, $1 # encoding: [0x21,0x20,0x81,0x00] + addu $4, -0x8001 +# CHECK-NEXT: lui $1, 0xffff # encoding: [0xff,0xff,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0x7fff # encoding: [0xff,0x7f,0x21,0x34] +# CHECK-NEXT: addu $4, $4, $1 # encoding: [0x21,0x20,0x81,0x00] + addu $4, -0x8000 +# CHECK-NEXT: addiu $4, $4, -0x8000 # encoding: [0x00,0x80,0x84,0x24] + addu $4, 0 +# CHECK-NEXT: addiu $4, $4, 0x0 # encoding: [0x00,0x00,0x84,0x24] + addu $4, 0xFFFF +# CHECK-NEXT: ori $1, $zero, 0xffff # encoding: [0xff,0xff,0x01,0x34] +# CHECK-NEXT: addu $4, $4, $1 # encoding: [0x21,0x20,0x81,0x00] + addu $4, 0x10000 +# CHECK-NEXT: lui $1, 0x1 # encoding: [0x01,0x00,0x01,0x3c] +# CHECK-NEXT: addu $4, $4, $1 # encoding: [0x21,0x20,0x81,0x00] + addu $4, 0xFFFFFFFF # This should be sign-extended because it's a 32-bit add +# CHECK-NEXT: addiu $4, $4, -0x1 # encoding: [0xff,0xff,0x84,0x24] + addu $4, ~(0xf0000000|0x0f000000|0x000000f0) +# CHECK-NEXT: lui $1, 0xff # encoding: [0xff,0x00,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0xff0f # encoding: [0x0f,0xff,0x21,0x34] +# CHECK-NEXT: addu $4, $4, $1 # encoding: [0x21,0x20,0x81,0x00] + + addu $4, $5, -0x80000000 +# CHECK: lui $4, 0x8000 # encoding: [0x00,0x80,0x04,0x3c] +# CHECK-NEXT: addu $4, $4, $5 # encoding: [0x21,0x20,0x85,0x00] + addu $4, $5, -0x8001 +# CHECK-NEXT: lui $4, 0xffff # encoding: [0xff,0xff,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0x7fff # encoding: [0xff,0x7f,0x84,0x34] +# CHECK-NEXT: addu $4, $4, $5 # encoding: [0x21,0x20,0x85,0x00] + addu $4, $5, -0x8000 +# CHECK-NEXT: addiu $4, $5, -0x8000 # encoding: [0x00,0x80,0xa4,0x24] + addu $4, $5, 0 +# CHECK-NEXT: addiu $4, $5, 0x0 # encoding: [0x00,0x00,0xa4,0x24] + addu $4, $5, 0xFFFF +# CHECK-NEXT: ori $4, $zero, 0xffff # encoding: [0xff,0xff,0x04,0x34] +# CHECK-NEXT: addu $4, $4, $5 # encoding: [0x21,0x20,0x85,0x00] + addu $4, $5, 0x10000 +# CHECK-NEXT: lui $4, 0x1 # encoding: [0x01,0x00,0x04,0x3c] +# CHECK-NEXT: addu $4, $4, $5 # encoding: [0x21,0x20,0x85,0x00] + addu $4, $5, 0xFFFFFFFF # This should be sign-extended because it's a 32-bit add +# CHECK-NEXT: addiu $4, $5, -0x1 # encoding: [0xff,0xff,0xa4,0x24] + addu $4, $5, ~(0xf0000000|0x0f000000|0x000000f0) +# CHECK-NEXT: lui $4, 0xff # encoding: [0xff,0x00,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0xff0f # encoding: [0x0f,0xff,0x84,0x34] +# CHECK-NEXT: addu $4, $4, $5 # encoding: [0x21,0x20,0x85,0x00] + + + and $4, -0x80000000 +# CHECK: lui $1, 0x8000 # encoding: [0x00,0x80,0x01,0x3c] +# CHECK-NEXT: and $4, $4, $1 # encoding: [0x24,0x20,0x81,0x00] + and $4, -0x8001 +# CHECK-NEXT: lui $1, 0xffff # encoding: [0xff,0xff,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0x7fff # encoding: [0xff,0x7f,0x21,0x34] +# CHECK-NEXT: and $4, $4, $1 # encoding: [0x24,0x20,0x81,0x00] + and $4, -0x8000 +# CHECK-NEXT: addiu $1, $zero, -0x8000 # encoding: [0x00,0x80,0x01,0x24] +# CHECK-NEXT: and $4, $4, $1 # encoding: [0x24,0x20,0x81,0x00] + and $4, 0 +# CHECK-NEXT: andi $4, $4, 0x0 # encoding: [0x00,0x00,0x84,0x30] + and $4, 0xFFFF +# CHECK-NEXT: andi $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x30] + and $4, 0x10000 +# CHECK-NEXT: lui $1, 0x1 # encoding: [0x01,0x00,0x01,0x3c] +# CHECK-NEXT: and $4, $4, $1 # encoding: [0x24,0x20,0x81,0x00] + and $4, 0xFFFFFFFF +# CHECK-NEXT: lui $1, 0xffff # encoding: [0xff,0xff,0x01,0x3c] +# CHECK-NEXT: dsrl32 $1, $1, 0x0 # encoding: [0x3e,0x08,0x01,0x00] +# CHECK-NEXT: and $4, $4, $1 # encoding: [0x24,0x20,0x81,0x00] + and $4, 0xF0000000 +# CHECK-NEXT: ori $1, $zero, 0xf000 # encoding: [0x00,0xf0,0x01,0x34] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: and $4, $4, $1 # encoding: [0x24,0x20,0x81,0x00] + and $4, 0x7FFFFFFF +# CHECK-NEXT: lui $1, 0x7fff # encoding: [0xff,0x7f,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0xffff # encoding: [0xff,0xff,0x21,0x34] +# CHECK-NEXT: and $4, $4, $1 # encoding: [0x24,0x20,0x81,0x00] + and $4, 0x7FFFFFFFFFFFFFFF +# CHECK-NEXT: lui $1, 0x7fff # encoding: [0xff,0x7f,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0xffff # encoding: [0xff,0xff,0x21,0x34] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: ori $1, $1, 0xffff # encoding: [0xff,0xff,0x21,0x34] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: ori $1, $1, 0xffff # encoding: [0xff,0xff,0x21,0x34] +# CHECK-NEXT: and $4, $4, $1 # encoding: [0x24,0x20,0x81,0x00] + and $4, 0xFFFFFFFFFFFFFFFF +# CHECK-NEXT: addiu $1, $zero, -0x1 # encoding: [0xff,0xff,0x01,0x24] +# CHECK-NEXT: and $4, $4, $1 # encoding: [0x24,0x20,0x81,0x00] + and $4, 0xF000000000000000 +# CHECK-NEXT: ori $1, $zero, 0xf000 # encoding: [0x00,0xf0,0x01,0x34] +# CHECK-NEXT: dsll $1, $1, 0x30 # encoding: [0x3c,0x0c,0x01,0x00] +# CHECK-NEXT: and $4, $4, $1 # encoding: [0x24,0x20,0x81,0x00] + and $4, ~(0xf0000000|0x0f000000|0x000000f0) +# CHECK-NEXT: addiu $1, $zero, -0x1 # encoding: [0xff,0xff,0x01,0x24] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: ori $1, $1, 0xff # encoding: [0xff,0x00,0x21,0x34] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: ori $1, $1, 0xff0f # encoding: [0x0f,0xff,0x21,0x34] +# CHECK-NEXT: and $4, $4, $1 # encoding: [0x24,0x20,0x81,0x00] + + and $4, $5, -0x80000000 +# CHECK: lui $4, 0x8000 # encoding: [0x00,0x80,0x04,0x3c] +# CHECK-NEXT: and $4, $4, $5 # encoding: [0x24,0x20,0x85,0x00] + and $4, $5, -0x8001 +# CHECK-NEXT: lui $4, 0xffff # encoding: [0xff,0xff,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0x7fff # encoding: [0xff,0x7f,0x84,0x34] +# CHECK-NEXT: and $4, $4, $5 # encoding: [0x24,0x20,0x85,0x00] + and $4, $5, -0x8000 +# CHECK-NEXT: addiu $4, $zero, -0x8000 # encoding: [0x00,0x80,0x04,0x24] +# CHECK-NEXT: and $4, $4, $5 # encoding: [0x24,0x20,0x85,0x00] + and $4, $5, 0 +# CHECK-NEXT: andi $4, $5, 0x0 # encoding: [0x00,0x00,0xa4,0x30] + and $4, $5, 0xFFFF +# CHECK-NEXT: andi $4, $5, 0xffff # encoding: [0xff,0xff,0xa4,0x30] + and $4, $5, 0x10000 +# CHECK-NEXT: lui $4, 0x1 # encoding: [0x01,0x00,0x04,0x3c] +# CHECK-NEXT: and $4, $4, $5 # encoding: [0x24,0x20,0x85,0x00] + and $4, $5, 0xFFFFFFFF +# CHECK-NEXT: lui $4, 0xffff # encoding: [0xff,0xff,0x04,0x3c] +# CHECK-NEXT: dsrl32 $4, $4, 0x0 # encoding: [0x3e,0x20,0x04,0x00] +# CHECK-NEXT: and $4, $4, $5 # encoding: [0x24,0x20,0x85,0x00] + and $4, $5, 0xF0000000 +# CHECK-NEXT: ori $4, $zero, 0xf000 # encoding: [0x00,0xf0,0x04,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: and $4, $4, $5 # encoding: [0x24,0x20,0x85,0x00] + and $4, $5, 0x7FFFFFFF +# CHECK-NEXT: lui $4, 0x7fff # encoding: [0xff,0x7f,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: and $4, $4, $5 # encoding: [0x24,0x20,0x85,0x00] + and $4, $5, 0x7FFFFFFFFFFFFFFF +# CHECK-NEXT: lui $4, 0x7fff # encoding: [0xff,0x7f,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: and $4, $4, $5 # encoding: [0x24,0x20,0x85,0x00] + and $4, $5, 0xFFFFFFFFFFFFFFFF +# CHECK-NEXT: addiu $4, $zero, -0x1 # encoding: [0xff,0xff,0x04,0x24] +# CHECK-NEXT: and $4, $4, $5 # encoding: [0x24,0x20,0x85,0x00] + and $4, $5, 0xF000000000000000 +# CHECK-NEXT: ori $4, $zero, 0xf000 # encoding: [0x00,0xf0,0x04,0x34] +# CHECK-NEXT: dsll $4, $4, 0x30 # encoding: [0x3c,0x24,0x04,0x00] +# CHECK-NEXT: and $4, $4, $5 # encoding: [0x24,0x20,0x85,0x00] + and $4, $5, ~(0xf0000000|0x0f000000|0x000000f0) +# CHECK-NEXT: addiu $4, $zero, -0x1 # encoding: [0xff,0xff,0x04,0x24] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xff # encoding: [0xff,0x00,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xff0f # encoding: [0x0f,0xff,0x84,0x34] +# CHECK-NEXT: and $4, $4, $5 # encoding: [0x24,0x20,0x85,0x00] + + or $4, -0x80000000 +# CHECK: lui $1, 0x8000 # encoding: [0x00,0x80,0x01,0x3c] +# CHECK-NEXT: or $4, $4, $1 # encoding: [0x25,0x20,0x81,0x00] + or $4, -0x8001 +# CHECK-NEXT: lui $1, 0xffff # encoding: [0xff,0xff,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0x7fff # encoding: [0xff,0x7f,0x21,0x34] +# CHECK-NEXT: or $4, $4, $1 # encoding: [0x25,0x20,0x81,0x00] + or $4, -0x8000 +# CHECK-NEXT: addiu $1, $zero, -0x8000 # encoding: [0x00,0x80,0x01,0x24] +# CHECK-NEXT: or $4, $4, $1 # encoding: [0x25,0x20,0x81,0x00] + or $4, 0 +# CHECK-NEXT: ori $4, $4, 0x0 # encoding: [0x00,0x00,0x84,0x34] + or $4, 0xFFFF +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] + or $4, 0x10000 +# CHECK-NEXT: lui $1, 0x1 # encoding: [0x01,0x00,0x01,0x3c] +# CHECK-NEXT: or $4, $4, $1 # encoding: [0x25,0x20,0x81,0x00] + or $4, 0xFFFFFFFF +# CHECK-NEXT: lui $1, 0xffff # encoding: [0xff,0xff,0x01,0x3c] +# CHECK-NEXT: dsrl32 $1, $1, 0x0 # encoding: [0x3e,0x08,0x01,0x00] +# CHECK-NEXT: or $4, $4, $1 # encoding: [0x25,0x20,0x81,0x00] + or $4, 0xF0000000 +# CHECK-NEXT: ori $1, $zero, 0xf000 # encoding: [0x00,0xf0,0x01,0x34] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: or $4, $4, $1 # encoding: [0x25,0x20,0x81,0x00] + or $4, 0x7FFFFFFF +# CHECK-NEXT: lui $1, 0x7fff # encoding: [0xff,0x7f,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0xffff # encoding: [0xff,0xff,0x21,0x34] +# CHECK-NEXT: or $4, $4, $1 # encoding: [0x25,0x20,0x81,0x00] + or $4, 0x7FFFFFFFFFFFFFFF +# CHECK-NEXT: lui $1, 0x7fff # encoding: [0xff,0x7f,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0xffff # encoding: [0xff,0xff,0x21,0x34] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: ori $1, $1, 0xffff # encoding: [0xff,0xff,0x21,0x34] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: ori $1, $1, 0xffff # encoding: [0xff,0xff,0x21,0x34] +# CHECK-NEXT: or $4, $4, $1 # encoding: [0x25,0x20,0x81,0x00] + or $4, 0xFFFFFFFFFFFFFFFF +# CHECK-NEXT: addiu $1, $zero, -0x1 # encoding: [0xff,0xff,0x01,0x24] +# CHECK-NEXT: or $4, $4, $1 # encoding: [0x25,0x20,0x81,0x00] + or $4, 0xF000000000000000 +# CHECK-NEXT: ori $1, $zero, 0xf000 # encoding: [0x00,0xf0,0x01,0x34] +# CHECK-NEXT: dsll $1, $1, 0x30 # encoding: [0x3c,0x0c,0x01,0x00] +# CHECK-NEXT: or $4, $4, $1 # encoding: [0x25,0x20,0x81,0x00] + or $4, $5, ~(0xf0000000|0x0f000000|0x000000f0) +# CHECK-NEXT: addiu $4, $zero, -0x1 # encoding: [0xff,0xff,0x04,0x24] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xff # encoding: [0xff,0x00,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xff0f # encoding: [0x0f,0xff,0x84,0x34] +# CHECK-NEXT: or $4, $4, $5 # encoding: [0x25,0x20,0x85,0x00] + + or $4, $5, -0x80000000 +# CHECK: lui $4, 0x8000 # encoding: [0x00,0x80,0x04,0x3c] +# CHECK-NEXT: or $4, $4, $5 # encoding: [0x25,0x20,0x85,0x00] + or $4, $5, -0x8001 +# CHECK-NEXT: lui $4, 0xffff # encoding: [0xff,0xff,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0x7fff # encoding: [0xff,0x7f,0x84,0x34] +# CHECK-NEXT: or $4, $4, $5 # encoding: [0x25,0x20,0x85,0x00] + or $4, $5, -0x8000 +# CHECK-NEXT: addiu $4, $zero, -0x8000 # encoding: [0x00,0x80,0x04,0x24] +# CHECK-NEXT: or $4, $4, $5 # encoding: [0x25,0x20,0x85,0x00] + or $4, $5, 0 +# CHECK-NEXT: ori $4, $5, 0x0 # encoding: [0x00,0x00,0xa4,0x34] + or $4, $5, 0xFFFF +# CHECK-NEXT: ori $4, $5, 0xffff # encoding: [0xff,0xff,0xa4,0x34] + or $4, $5, 0x10000 +# CHECK-NEXT: lui $4, 0x1 # encoding: [0x01,0x00,0x04,0x3c] +# CHECK-NEXT: or $4, $4, $5 # encoding: [0x25,0x20,0x85,0x00] + or $4, $5, 0xFFFFFFFF +# CHECK-NEXT: lui $4, 0xffff # encoding: [0xff,0xff,0x04,0x3c] +# CHECK-NEXT: dsrl32 $4, $4, 0x0 # encoding: [0x3e,0x20,0x04,0x00] +# CHECK-NEXT: or $4, $4, $5 # encoding: [0x25,0x20,0x85,0x00] + or $4, $5, 0xF0000000 +# CHECK-NEXT: ori $4, $zero, 0xf000 # encoding: [0x00,0xf0,0x04,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: or $4, $4, $5 # encoding: [0x25,0x20,0x85,0x00] + or $4, $5, 0x7FFFFFFF +# CHECK-NEXT: lui $4, 0x7fff # encoding: [0xff,0x7f,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: or $4, $4, $5 # encoding: [0x25,0x20,0x85,0x00] + or $4, $5, 0x7FFFFFFFFFFFFFFF +# CHECK-NEXT: lui $4, 0x7fff # encoding: [0xff,0x7f,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: or $4, $4, $5 # encoding: [0x25,0x20,0x85,0x00] + or $4, $5, 0xFFFFFFFFFFFFFFFF +# CHECK-NEXT: addiu $4, $zero, -0x1 # encoding: [0xff,0xff,0x04,0x24] +# CHECK-NEXT: or $4, $4, $5 # encoding: [0x25,0x20,0x85,0x00] + or $4, $5, 0xF000000000000000 +# CHECK-NEXT: ori $4, $zero, 0xf000 # encoding: [0x00,0xf0,0x04,0x34] +# CHECK-NEXT: dsll $4, $4, 0x30 # encoding: [0x3c,0x24,0x04,0x00] +# CHECK-NEXT: or $4, $4, $5 # encoding: [0x25,0x20,0x85,0x00] + or $4, $5, ~(0xf0000000|0x0f000000|0x000000f0) +# CHECK-NEXT: addiu $4, $zero, -0x1 # encoding: [0xff,0xff,0x04,0x24] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xff # encoding: [0xff,0x00,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xff0f # encoding: [0x0f,0xff,0x84,0x34] +# CHECK-NEXT: or $4, $4, $5 # encoding: [0x25,0x20,0x85,0x00] + + xor $4, -0x80000000 +# CHECK: lui $1, 0x8000 # encoding: [0x00,0x80,0x01,0x3c] +# CHECK-NEXT: xor $4, $4, $1 # encoding: [0x26,0x20,0x81,0x00] + xor $4, -0x8001 +# CHECK-NEXT: lui $1, 0xffff # encoding: [0xff,0xff,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0x7fff # encoding: [0xff,0x7f,0x21,0x34] +# CHECK-NEXT: xor $4, $4, $1 # encoding: [0x26,0x20,0x81,0x00] + xor $4, -0x8000 +# CHECK-NEXT: addiu $1, $zero, -0x8000 # encoding: [0x00,0x80,0x01,0x24] +# CHECK-NEXT: xor $4, $4, $1 # encoding: [0x26,0x20,0x81,0x00] + xor $4, 0 +# CHECK-NEXT: xori $4, $4, 0x0 # encoding: [0x00,0x00,0x84,0x38] + xor $4, 0xFFFF +# CHECK-NEXT: xori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x38] + xor $4, 0x10000 +# CHECK-NEXT: lui $1, 0x1 # encoding: [0x01,0x00,0x01,0x3c] +# CHECK-NEXT: xor $4, $4, $1 # encoding: [0x26,0x20,0x81,0x00] + xor $4, 0xFFFFFFFF +# CHECK-NEXT: lui $1, 0xffff # encoding: [0xff,0xff,0x01,0x3c] +# CHECK-NEXT: dsrl32 $1, $1, 0x0 # encoding: [0x3e,0x08,0x01,0x00] +# CHECK-NEXT: xor $4, $4, $1 # encoding: [0x26,0x20,0x81,0x00] + xor $4, 0xF0000000 +# CHECK-NEXT: ori $1, $zero, 0xf000 # encoding: [0x00,0xf0,0x01,0x34] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: xor $4, $4, $1 # encoding: [0x26,0x20,0x81,0x00 + xor $4, 0x7FFFFFFF +# CHECK-NEXT: lui $1, 0x7fff # encoding: [0xff,0x7f,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0xffff # encoding: [0xff,0xff,0x21,0x34] +# CHECK-NEXT: xor $4, $4, $1 # encoding: [0x26,0x20,0x81,0x00] + xor $4, 0x7FFFFFFFFFFFFFFF +# CHECK-NEXT: lui $1, 0x7fff # encoding: [0xff,0x7f,0x01,0x3c] +# CHECK-NEXT: ori $1, $1, 0xffff # encoding: [0xff,0xff,0x21,0x34] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: ori $1, $1, 0xffff # encoding: [0xff,0xff,0x21,0x34] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: ori $1, $1, 0xffff # encoding: [0xff,0xff,0x21,0x34] +# CHECK-NEXT: xor $4, $4, $1 # encoding: [0x26,0x20,0x81,0x00] + xor $4, 0xFFFFFFFFFFFFFFFF +# CHECK-NEXT: addiu $1, $zero, -0x1 # encoding: [0xff,0xff,0x01,0x24] +# CHECK-NEXT: xor $4, $4, $1 # encoding: [0x26,0x20,0x81,0x00] + xor $4, 0xF000000000000000 +# CHECK-NEXT: ori $1, $zero, 0xf000 # encoding: [0x00,0xf0,0x01,0x34] +# CHECK-NEXT: dsll $1, $1, 0x30 # encoding: [0x3c,0x0c,0x01,0x00] +# CHECK-NEXT: xor $4, $4, $1 # encoding: [0x26,0x20,0x81,0x00] + xor $4, ~(0xf0000000|0x0f000000|0x000000f0) +# CHECK-NEXT: addiu $1, $zero, -0x1 # encoding: [0xff,0xff,0x01,0x24] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: ori $1, $1, 0xff # encoding: [0xff,0x00,0x21,0x34] +# CHECK-NEXT: dsll $1, $1, 0x10 # encoding: [0x38,0x0c,0x01,0x00] +# CHECK-NEXT: ori $1, $1, 0xff0f # encoding: [0x0f,0xff,0x21,0x34] +# CHECK-NEXT: xor $4, $4, $1 # encoding: [0x26,0x20,0x81,0x00] + + xor $4, $5, -0x80000000 +# CHECK: lui $4, 0x8000 # encoding: [0x00,0x80,0x04,0x3c] +# CHECK-NEXT: xor $4, $4, $5 # encoding: [0x26,0x20,0x85,0x00] + xor $4, $5, -0x8001 +# CHECK-NEXT: lui $4, 0xffff # encoding: [0xff,0xff,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0x7fff # encoding: [0xff,0x7f,0x84,0x34] +# CHECK-NEXT: xor $4, $4, $5 # encoding: [0x26,0x20,0x85,0x00] + xor $4, $5, -0x8000 +# CHECK-NEXT: addiu $4, $zero, -0x8000 # encoding: [0x00,0x80,0x04,0x24] +# CHECK-NEXT: xor $4, $4, $5 # encoding: [0x26,0x20,0x85,0x00] + xor $4, $5, 0 +# CHECK-NEXT: xori $4, $5, 0x0 # encoding: [0x00,0x00,0xa4,0x38] + xor $4, $5, 0xFFFF +# CHECK-NEXT: xori $4, $5, 0xffff # encoding: [0xff,0xff,0xa4,0x38] + xor $4, $5, 0x10000 +# CHECK-NEXT: lui $4, 0x1 # encoding: [0x01,0x00,0x04,0x3c] +# CHECK-NEXT: xor $4, $4, $5 # encoding: [0x26,0x20,0x85,0x00] + xor $4, $5, 0xFFFFFFFF +# CHECK-NEXT: lui $4, 0xffff # encoding: [0xff,0xff,0x04,0x3c] +# CHECK-NEXT: dsrl32 $4, $4, 0x0 # encoding: [0x3e,0x20,0x04,0x00] +# CHECK-NEXT: xor $4, $4, $5 # encoding: [0x26,0x20,0x85,0x00] + xor $4, $5, 0xF0000000 +# CHECK-NEXT: ori $4, $zero, 0xf000 # encoding: [0x00,0xf0,0x04,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: xor $4, $4, $5 # encoding: [0x26,0x20,0x85,0x00] + xor $4, $5, 0x7FFFFFFF +# CHECK-NEXT: lui $4, 0x7fff # encoding: [0xff,0x7f,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: xor $4, $4, $5 # encoding: [0x26,0x20,0x85,0x00] + xor $4, $5, 0x7FFFFFFFFFFFFFFF +# FIXME: this is awfully inefficient... +# CHECK-NEXT: lui $4, 0x7fff # encoding: [0xff,0x7f,0x04,0x3c] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xffff # encoding: [0xff,0xff,0x84,0x34] +# CHECK-NEXT: xor $4, $4, $5 # encoding: [0x26,0x20,0x85,0x00] + xor $4, $5, 0xFFFFFFFFFFFFFFFF +# CHECK-NEXT: addiu $4, $zero, -0x1 # encoding: [0xff,0xff,0x04,0x24] +# CHECK-NEXT: xor $4, $4, $5 # encoding: [0x26,0x20,0x85,0x00] + xor $4, $5, 0xF000000000000000 +# CHECK-NEXT: ori $4, $zero, 0xf000 # encoding: [0x00,0xf0,0x04,0x34] +# CHECK-NEXT: dsll $4, $4, 0x30 # encoding: [0x3c,0x24,0x04,0x00] +# CHECK-NEXT: xor $4, $4, $5 # encoding: [0x26,0x20,0x85,0x00] + xor $4, $5, ~(0xf0000000|0x0f000000|0x000000f0) +# CHECK-NEXT: addiu $4, $zero, -0x1 # encoding: [0xff,0xff,0x04,0x24] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xff # encoding: [0xff,0x00,0x84,0x34] +# CHECK-NEXT: dsll $4, $4, 0x10 # encoding: [0x38,0x24,0x04,0x00] +# CHECK-NEXT: ori $4, $4, 0xff0f # encoding: [0x0f,0xff,0x84,0x34] +# CHECK-NEXT: xor $4, $4, $5 # encoding: [0x26,0x20,0x85,0x00]