mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
ARM simplify the postidx_reg operand encoding.
The immediate portion of the operand is just a boolean (the 'U' bit indicating add vs. subtract). Treat it as such. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136969 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1543,10 +1543,16 @@ static bool DisassembleLdStMiscFrm(MCInst &MI, unsigned Opcode, uint32_t insn,
|
||||
++OpIdx;
|
||||
} else {
|
||||
// Disassemble the offset reg (Rm).
|
||||
unsigned Offset = ARM_AM::getAM3Opc(AddrOpcode, 0);
|
||||
MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID,
|
||||
decodeRm(insn))));
|
||||
MI.addOperand(MCOperand::CreateImm(Offset));
|
||||
// FIXME: Remove the 'else' once done w/ addrmode3 refactor.
|
||||
if (Opcode == ARM::STRHTr || Opcode == ARM::LDRSBTr ||
|
||||
Opcode == ARM::LDRHTr || Opcode == ARM::LDRSHTr)
|
||||
MI.addOperand(MCOperand::CreateImm(getUBit(insn)));
|
||||
else {
|
||||
unsigned Offset = ARM_AM::getAM3Opc(AddrOpcode, 0);
|
||||
MI.addOperand(MCOperand::CreateImm(Offset));
|
||||
}
|
||||
OpIdx += 2;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user