mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Fix <rdar://problem/9476260> by having tail calls always generate 32-bit branches
in Darwin Thumb2 code. Tail calls are already disabled on Thumb1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131894 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1832,7 +1832,9 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
case ARM::tTAILJMPdND: {
|
||||
MCInst TmpInst, TmpInst2;
|
||||
LowerARMMachineInstrToMCInst(MI, TmpInst2, *this);
|
||||
TmpInst.setOpcode(ARM::tB);
|
||||
// The Darwin toolchain doesn't support tail call relocations of 16-bit
|
||||
// branches.
|
||||
TmpInst.setOpcode(Opc == ARM::tTAILJMPd ? ARM::t2B : ARM::tB);
|
||||
TmpInst.addOperand(TmpInst2.getOperand(0));
|
||||
OutStreamer.AddComment("TAILCALL");
|
||||
OutStreamer.EmitInstruction(TmpInst);
|
||||
|
Reference in New Issue
Block a user