Skip to content

Commit a06704d

Browse files
committed
Fix printing of 'pop' alias.
The condition to print the 'pop' alias could never be fulfilled, because the immediate was encoded for Address Modes 2.
1 parent 3353f7d commit a06704d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ void ARMInstPrinter::printInst(const MCInst *MI, uint64_t Address,
189189

190190
case ARM::LDR_POST_IMM:
191191
if (MI->getOperand(2).getReg() == ARM::SP &&
192-
MI->getOperand(4).getImm() == 4) {
192+
ARM_AM::getAM2Offset(MI->getOperand(4).getImm()) == 4) {
193193
O << '\t' << "pop";
194194
printPredicateOperand(MI, 5, STI, O);
195195
O << "\t{";

0 commit comments

Comments
 (0)