mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-15 19:24:33 +00:00
Prevent ARM assembler from losing a right shift by #32 applied to a register
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7247,7 +7247,9 @@ processInstruction(MCInst &Inst,
|
||||
case ARM::ADDrsi: newOpc = ARM::ADDrr; break;
|
||||
}
|
||||
// If the shift is by zero, use the non-shifted instruction definition.
|
||||
if (ARM_AM::getSORegOffset(Inst.getOperand(3).getImm()) == 0) {
|
||||
// The exception is for right shifts, where 0 == 32
|
||||
if (ARM_AM::getSORegOffset(Inst.getOperand(3).getImm()) == 0 &&
|
||||
!(SOpc == ARM_AM::lsr || SOpc == ARM_AM::asr)) {
|
||||
MCInst TmpInst;
|
||||
TmpInst.setOpcode(newOpc);
|
||||
TmpInst.addOperand(Inst.getOperand(0));
|
||||
|
Reference in New Issue
Block a user