summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2015-08-18 09:55:57 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2015-08-18 09:55:57 +0000
commitf1ae367a990c169e21da1e2904684f43617216f5 (patch)
tree7cabd3b9ca615b4431ddd2014b8fc0ae9f07e249 /llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
parent77c0f5a3b71208434a6109c543412cfe4037ee52 (diff)
downloadbcm5719-llvm-f1ae367a990c169e21da1e2904684f43617216f5.tar.gz
bcm5719-llvm-f1ae367a990c169e21da1e2904684f43617216f5.zip
[mips] Correct -Woverflow warning in r245208 without changing signedness of the constant.
This was supposed to have been committed as part of r245208 llvm-svn: 245285
Diffstat (limited to 'llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp')
-rw-r--r--llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
index 393c9e79cfb..2d82b35cc6e 100644
--- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/llvm/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<MCInst> &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);
OpenPOWER on IntegriCloud