mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Use tPseudoExpand for tTAILJMPrND and tTAILJMPr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134734 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af7f2d6b67
commit
0b44aea7b5
@ -1799,20 +1799,6 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Tail jump branches are really just branch instructions with additional
|
|
||||||
// code-gen attributes. Convert them to the canonical form here.
|
|
||||||
case ARM::tTAILJMPrND:
|
|
||||||
case ARM::tTAILJMPr: {
|
|
||||||
MCInst TmpInst;
|
|
||||||
TmpInst.setOpcode(ARM::tBX);
|
|
||||||
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg()));
|
|
||||||
// Predicate.
|
|
||||||
TmpInst.addOperand(MCOperand::CreateImm(ARMCC::AL));
|
|
||||||
TmpInst.addOperand(MCOperand::CreateReg(0));
|
|
||||||
OutStreamer.AddComment("TAILCALL");
|
|
||||||
OutStreamer.EmitInstruction(TmpInst);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MCInst TmpInst;
|
MCInst TmpInst;
|
||||||
|
@ -578,9 +578,10 @@ let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1 in {
|
|||||||
Uses = [SP] in {
|
Uses = [SP] in {
|
||||||
// tTAILJMPd: Darwin version uses a Thumb2 branch (no Thumb1 tail calls
|
// tTAILJMPd: Darwin version uses a Thumb2 branch (no Thumb1 tail calls
|
||||||
// on Darwin), so it's in ARMInstrThumb2.td.
|
// on Darwin), so it's in ARMInstrThumb2.td.
|
||||||
def tTAILJMPr : tPseudoInst<(outs), (ins tcGPR:$dst, variable_ops),
|
def tTAILJMPr : tPseudoExpand<(outs), (ins tcGPR:$dst, variable_ops),
|
||||||
Size4Bytes, IIC_Br,
|
Size4Bytes, IIC_Br, [],
|
||||||
[]>, Requires<[IsThumb, IsDarwin]>;
|
(tBX GPR:$dst, (ops 14, zero_reg))>,
|
||||||
|
Requires<[IsThumb, IsDarwin]>;
|
||||||
}
|
}
|
||||||
// Non-Darwin versions (the difference is R9).
|
// Non-Darwin versions (the difference is R9).
|
||||||
let Defs = [R0, R1, R2, R3, R12, QQQQ0, QQQQ2, QQQQ3, PC],
|
let Defs = [R0, R1, R2, R3, R12, QQQQ0, QQQQ2, QQQQ3, PC],
|
||||||
@ -589,9 +590,10 @@ let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1 in {
|
|||||||
Size4Bytes, IIC_Br, [],
|
Size4Bytes, IIC_Br, [],
|
||||||
(tB t_brtarget:$dst)>,
|
(tB t_brtarget:$dst)>,
|
||||||
Requires<[IsThumb, IsNotDarwin]>;
|
Requires<[IsThumb, IsNotDarwin]>;
|
||||||
def tTAILJMPrND : tPseudoInst<(outs), (ins tcGPR:$dst, variable_ops),
|
def tTAILJMPrND : tPseudoExpand<(outs), (ins tcGPR:$dst, variable_ops),
|
||||||
Size4Bytes, IIC_Br,
|
Size4Bytes, IIC_Br, [],
|
||||||
[]>, Requires<[IsThumb, IsNotDarwin]>;
|
(tBX GPR:$dst, (ops 14, zero_reg))>,
|
||||||
|
Requires<[IsThumb, IsNotDarwin]>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user