mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
Clarify naming and correct conditional so that CMP and CMN instructions get the Rn operand encoded properly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57252 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -392,14 +392,11 @@ unsigned ARMCodeEmitter::getAddrMode1InstrBinary(const MachineInstr &MI,
|
|||||||
|
|
||||||
// Encode first non-shifter register operand if there is one.
|
// Encode first non-shifter register operand if there is one.
|
||||||
unsigned Format = TID.TSFlags & ARMII::FormMask;
|
unsigned Format = TID.TSFlags & ARMII::FormMask;
|
||||||
bool isUnary = (Format == ARMII::DPRdMisc ||
|
bool hasRnOperand= !(Format == ARMII::DPRdMisc ||
|
||||||
Format == ARMII::DPRdIm ||
|
Format == ARMII::DPRdIm ||
|
||||||
Format == ARMII::DPRdReg ||
|
Format == ARMII::DPRdReg ||
|
||||||
Format == ARMII::DPRdSoReg ||
|
Format == ARMII::DPRdSoReg);
|
||||||
Format == ARMII::DPRnIm ||
|
if (hasRnOperand) {
|
||||||
Format == ARMII::DPRnReg ||
|
|
||||||
Format == ARMII::DPRnSoReg);
|
|
||||||
if (!isUnary) {
|
|
||||||
Binary |= getMachineOpValue(MI, OpIdx) << ARMII::RegRnShift;
|
Binary |= getMachineOpValue(MI, OpIdx) << ARMII::RegRnShift;
|
||||||
++OpIdx;
|
++OpIdx;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user