mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Convert tBX_CALL / tBXr9_CALL to actual pseudoinstructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132086 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
410ef2b263
commit
ad70f6d2b1
@ -1222,6 +1222,26 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
case ARM::tBXr9_CALL:
|
||||
case ARM::tBX_CALL: {
|
||||
{
|
||||
MCInst TmpInst;
|
||||
TmpInst.setOpcode(ARM::tMOVr);
|
||||
TmpInst.addOperand(MCOperand::CreateReg(ARM::LR));
|
||||
TmpInst.addOperand(MCOperand::CreateReg(ARM::PC));
|
||||
OutStreamer.EmitInstruction(TmpInst);
|
||||
}
|
||||
{
|
||||
MCInst TmpInst;
|
||||
TmpInst.setOpcode(ARM::tBX);
|
||||
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg()));
|
||||
// Add predicate operands.
|
||||
TmpInst.addOperand(MCOperand::CreateImm(ARMCC::AL));
|
||||
TmpInst.addOperand(MCOperand::CreateReg(0));
|
||||
OutStreamer.EmitInstruction(TmpInst);
|
||||
}
|
||||
return;
|
||||
}
|
||||
case ARM::BMOVPCRXr9_CALL:
|
||||
case ARM::BMOVPCRX_CALL: {
|
||||
{
|
||||
|
@ -463,11 +463,8 @@ let isCall = 1,
|
||||
}
|
||||
|
||||
// ARMv4T
|
||||
// FIXME: Should be a pseudo.
|
||||
let isCodeGenOnly = 1 in
|
||||
def tBX_CALL : TIx2<{?,?,?,?,?}, {?,?}, ?,
|
||||
(outs), (ins tGPR:$func, variable_ops), IIC_Br,
|
||||
"mov\tlr, pc\n\tbx\t$func",
|
||||
def tBX_CALL : tPseudoInst<(outs), (ins tGPR:$func, variable_ops),
|
||||
Size4Bytes, IIC_Br,
|
||||
[(ARMcall_nolink tGPR:$func)]>,
|
||||
Requires<[IsThumb, IsThumb1Only, IsNotDarwin]>;
|
||||
}
|
||||
@ -518,11 +515,8 @@ let isCall = 1,
|
||||
}
|
||||
|
||||
// ARMv4T
|
||||
let isCodeGenOnly = 1 in
|
||||
// FIXME: Should be a pseudo.
|
||||
def tBXr9_CALL : TIx2<{?,?,?,?,?}, {?,?}, ?,
|
||||
(outs), (ins tGPR:$func, variable_ops), IIC_Br,
|
||||
"mov\tlr, pc\n\tbx\t$func",
|
||||
def tBXr9_CALL : tPseudoInst<(outs), (ins tGPR:$func, variable_ops),
|
||||
Size4Bytes, IIC_Br,
|
||||
[(ARMcall_nolink tGPR:$func)]>,
|
||||
Requires<[IsThumb, IsThumb1Only, IsDarwin]>;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user