mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
Fix disassembly of Thumb2 LDRSH with a #-0 offset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139943 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -2731,7 +2731,10 @@ static DecodeStatus DecodeT2AddrModeImm0_1020s4(llvm::MCInst &Inst,unsigned Val,
|
||||
static DecodeStatus DecodeT2Imm8(llvm::MCInst &Inst, unsigned Val,
|
||||
uint64_t Address, const void *Decoder) {
|
||||
int imm = Val & 0xFF;
|
||||
if (!(Val & 0x100)) imm *= -1;
|
||||
if (Val == 0)
|
||||
imm = INT32_MIN;
|
||||
else if (!(Val & 0x100))
|
||||
imm *= -1;
|
||||
Inst.addOperand(MCOperand::CreateImm(imm));
|
||||
|
||||
return MCDisassembler::Success;
|
||||
|
Reference in New Issue
Block a user