Make sure to propagate the predicate operands for LEApcrel to ADR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121788 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2010-12-14 20:45:47 +00:00
parent 86abd48fd0
commit eb61272150

View File

@ -749,8 +749,8 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg())); TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg()));
TmpInst.addOperand(MCOperand::CreateExpr(SymbolExpr)); TmpInst.addOperand(MCOperand::CreateExpr(SymbolExpr));
// Add predicate operands. // Add predicate operands.
TmpInst.addOperand(MCOperand::CreateImm(ARMCC::AL)); TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm()));
TmpInst.addOperand(MCOperand::CreateReg(0)); TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
OutStreamer.EmitInstruction(TmpInst); OutStreamer.EmitInstruction(TmpInst);
return; return;
} }
@ -768,8 +768,8 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg())); TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg()));
TmpInst.addOperand(MCOperand::CreateExpr(SymbolExpr)); TmpInst.addOperand(MCOperand::CreateExpr(SymbolExpr));
// Add predicate operands. // Add predicate operands.
TmpInst.addOperand(MCOperand::CreateImm(ARMCC::AL)); TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(3).getImm()));
TmpInst.addOperand(MCOperand::CreateReg(0)); TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(4).getReg()));
OutStreamer.EmitInstruction(TmpInst); OutStreamer.EmitInstruction(TmpInst);
return; return;
} }