[llvm] r224752 - Fix UBSan bootstrap: replace shift of negative value with multiplication.
Alexey Samsonov
vonosmas at gmail.com
Mon Dec 22 20:15:54 PST 2014
Author: samsonov
Date: Mon Dec 22 22:15:53 2014
New Revision: 224752
URL: http://llvm.org/viewvc/llvm-project?rev=224752&view=rev
Log:
Fix UBSan bootstrap: replace shift of negative value with multiplication.
Modified:
llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
Modified: llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp?rev=224752&r1=224751&r2=224752&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp Mon Dec 22 22:15:53 2014
@@ -1614,7 +1614,7 @@ static DecodeStatus DecodeSimm9SP(MCInst
case 511: DecodedValue = -257; break;
default: DecodedValue = SignExtend32<9>(Insn); break;
}
- Inst.addOperand(MCOperand::CreateImm(DecodedValue << 2));
+ Inst.addOperand(MCOperand::CreateImm(DecodedValue * 4));
return MCDisassembler::Success;
}
More information about the llvm-commits
mailing list