mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
Disassembly of tBcc was wrongly adding 4 to the SignExtend'ed imm8:'0' immediate operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131565 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -957,7 +957,7 @@ static bool DisassembleThumb1CondBr(MCInst &MI, unsigned Opcode, uint32_t insn,
|
|||||||
|
|
||||||
unsigned Imm8 = getT1Imm8(insn);
|
unsigned Imm8 = getT1Imm8(insn);
|
||||||
MI.addOperand(MCOperand::CreateImm(
|
MI.addOperand(MCOperand::CreateImm(
|
||||||
Opcode == ARM::tBcc ? SignExtend32<9>(Imm8 << 1) + 4
|
Opcode == ARM::tBcc ? SignExtend32<9>(Imm8 << 1)
|
||||||
: (int)Imm8));
|
: (int)Imm8));
|
||||||
|
|
||||||
// Predicate operands by ARMBasicMCBuilder::TryPredicateAndSBitModifier().
|
// Predicate operands by ARMBasicMCBuilder::TryPredicateAndSBitModifier().
|
||||||
|
@@ -262,3 +262,6 @@
|
|||||||
|
|
||||||
# CHECK: nop.w
|
# CHECK: nop.w
|
||||||
0xaf 0xf3 0x00 0x80
|
0xaf 0xf3 0x00 0x80
|
||||||
|
|
||||||
|
# CHECK: bne #24
|
||||||
|
0x0c 0xd1
|
||||||
|
Reference in New Issue
Block a user