Avoid shifting a negative value by sign-extending after the shift.
Fixes a couple of tests that were failing under ubsan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240381
91177308-0d34-0410-b5e6-
96231b3b80d8
static DecodeStatus DecodeSimm23Lsl2(MCInst &Inst, unsigned Insn,
uint64_t Address, const void *Decoder) {
- Inst.addOperand(MCOperand::createImm(SignExtend32<23>(Insn) << 2));
+ Inst.addOperand(MCOperand::createImm(SignExtend32<25>(Insn << 2)));
return MCDisassembler::Success;
}