Correcting a -Woverflow warning where 0xFFFF was overflowing an implicit constant...
authorAaron Ballman <aaron@aaronballman.com>
Mon, 17 Aug 2015 14:25:57 +0000 (14:25 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 17 Aug 2015 14:25:57 +0000 (14:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245220 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/AsmParser/MipsAsmParser.cpp

index 26ce745a8e25ea19a509ac5a46e2944916084afa..393c9e79cfbee1701383f3086a18247a243ad560 100644 (file)
@@ -1934,7 +1934,7 @@ bool MipsAsmParser::loadImmediate(int64_t ImmValue, unsigned DstReg,
       // Traditional behaviour seems to special case this particular value. It's
       // not clear why other masks are handled differently.
       if (ImmValue == 0xffffffff) {
-        emitRI(Mips::LUi, TmpReg, 0xffff, IDLoc, Instructions);
+        emitRI(Mips::LUi, TmpReg, -1, IDLoc, Instructions);
         emitRRI(Mips::DSRL32, TmpReg, TmpReg, 0, IDLoc, Instructions);
         if (UseSrcReg)
           emitRRR(AdduOp, DstReg, TmpReg, SrcReg, IDLoc, Instructions);