From: Alexey Samsonov Date: Tue, 23 Dec 2014 04:15:53 +0000 (+0000) Subject: Fix UBSan bootstrap: replace shift of negative value with multiplication. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=2f6ad0c00f2506cc4c4e550be10a2a81ef24ca82;p=oota-llvm.git Fix UBSan bootstrap: replace shift of negative value with multiplication. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224752 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Mips/Disassembler/MipsDisassembler.cpp b/lib/Target/Mips/Disassembler/MipsDisassembler.cpp index e5355ef4333..1b955f59dcf 100644 --- a/lib/Target/Mips/Disassembler/MipsDisassembler.cpp +++ b/lib/Target/Mips/Disassembler/MipsDisassembler.cpp @@ -1614,7 +1614,7 @@ static DecodeStatus DecodeSimm9SP(MCInst &Inst, unsigned Insn, 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; }