From b4245136777697ba27ba5fb2daddf78053b0c815 Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Tue, 18 Aug 2015 09:55:57 +0000 Subject: [PATCH] [mips] Correct -Woverflow warning in r245208 without changing signedness of the constant. This was supposed to have been committed as part of r245208 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245285 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index 393c9e79cfb..2d82b35cc6e 100644 --- a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -1755,7 +1755,7 @@ void emitRX(unsigned Opcode, unsigned Reg0, MCOperand Op1, SMLoc IDLoc, Instructions.push_back(tmpInst); } -void emitRI(unsigned Opcode, unsigned Reg0, int16_t Imm, SMLoc IDLoc, +void emitRI(unsigned Opcode, unsigned Reg0, int32_t Imm, SMLoc IDLoc, SmallVectorImpl &Instructions) { emitRX(Opcode, Reg0, MCOperand::createImm(Imm), IDLoc, Instructions); } @@ -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, -1, IDLoc, Instructions); + emitRI(Mips::LUi, TmpReg, 0xffff, IDLoc, Instructions); emitRRI(Mips::DSRL32, TmpReg, TmpReg, 0, IDLoc, Instructions); if (UseSrcReg) emitRRR(AdduOp, DstReg, TmpReg, SrcReg, IDLoc, Instructions); -- 2.34.1