Skip to content

Commit

Permalink
Correcting a -Woverflow warning where 0xFFFF was overflowing an impli…
Browse files Browse the repository at this point in the history
…cit constant conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245220 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
AaronBallman committed Aug 17, 2015
1 parent 08b10aa commit df09c6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit df09c6b

Please sign in to comment.