mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +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;
|
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::BMOVPCRXr9_CALL:
|
||||||
case ARM::BMOVPCRX_CALL: {
|
case ARM::BMOVPCRX_CALL: {
|
||||||
{
|
{
|
||||||
|
@ -463,11 +463,8 @@ let isCall = 1,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ARMv4T
|
// ARMv4T
|
||||||
// FIXME: Should be a pseudo.
|
def tBX_CALL : tPseudoInst<(outs), (ins tGPR:$func, variable_ops),
|
||||||
let isCodeGenOnly = 1 in
|
Size4Bytes, IIC_Br,
|
||||||
def tBX_CALL : TIx2<{?,?,?,?,?}, {?,?}, ?,
|
|
||||||
(outs), (ins tGPR:$func, variable_ops), IIC_Br,
|
|
||||||
"mov\tlr, pc\n\tbx\t$func",
|
|
||||||
[(ARMcall_nolink tGPR:$func)]>,
|
[(ARMcall_nolink tGPR:$func)]>,
|
||||||
Requires<[IsThumb, IsThumb1Only, IsNotDarwin]>;
|
Requires<[IsThumb, IsThumb1Only, IsNotDarwin]>;
|
||||||
}
|
}
|
||||||
@ -518,11 +515,8 @@ let isCall = 1,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ARMv4T
|
// ARMv4T
|
||||||
let isCodeGenOnly = 1 in
|
def tBXr9_CALL : tPseudoInst<(outs), (ins tGPR:$func, variable_ops),
|
||||||
// FIXME: Should be a pseudo.
|
Size4Bytes, IIC_Br,
|
||||||
def tBXr9_CALL : TIx2<{?,?,?,?,?}, {?,?}, ?,
|
|
||||||
(outs), (ins tGPR:$func, variable_ops), IIC_Br,
|
|
||||||
"mov\tlr, pc\n\tbx\t$func",
|
|
||||||
[(ARMcall_nolink tGPR:$func)]>,
|
[(ARMcall_nolink tGPR:$func)]>,
|
||||||
Requires<[IsThumb, IsThumb1Only, IsDarwin]>;
|
Requires<[IsThumb, IsThumb1Only, IsDarwin]>;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user