[llvm] r245220 - Correcting a -Woverflow warning where 0xFFFF was overflowing an implicit constant conversion.
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 07:25:57 PDT 2015
Author: aaronballman
Date: Mon Aug 17 09:25:57 2015
New Revision: 245220
URL: http://llvm.org/viewvc/llvm-project?rev=245220&view=rev
Log:
Correcting a -Woverflow warning where 0xFFFF was overflowing an implicit constant conversion.
Modified:
llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=245220&r1=245219&r2=245220&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Mon Aug 17 09:25:57 2015
@@ -1934,7 +1934,7 @@ bool MipsAsmParser::loadImmediate(int64_
// 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);
More information about the llvm-commits
mailing list