mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
ARM Disassembler: sign extend branch immediates.
Not sure about BLXi, but this is what the old disassembler did. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137156 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1214,11 +1214,11 @@ static bool DecodeBranchImmInstruction(llvm::MCInst &Inst, unsigned Insn,
|
||||
if (pred == 0xF) {
|
||||
Inst.setOpcode(ARM::BLXi);
|
||||
imm |= fieldFromInstruction32(Insn, 24, 1) << 1;
|
||||
Inst.addOperand(MCOperand::CreateImm(imm));
|
||||
Inst.addOperand(MCOperand::CreateImm(SignExtend32<26>(imm)));
|
||||
return true;
|
||||
}
|
||||
|
||||
Inst.addOperand(MCOperand::CreateImm(imm));
|
||||
Inst.addOperand(MCOperand::CreateImm(SignExtend32<26>(imm)));
|
||||
if (!DecodePredicateOperand(Inst, pred, Address, Decoder)) return false;
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user