mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-21 03:32:29 +00:00
Do not set the `link' bit when branching to the first BB of a function, as it
will cause an infinite loop. The link bit is only used for calling functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14466 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
604fdc10bb
commit
9c661c8e26
@ -423,7 +423,7 @@ void Printer::printOp(const MachineOperand &MO,
|
||||
}
|
||||
case MachineOperand::MO_PCRelativeDisp:
|
||||
std::cerr << "Shouldn't use addPCDisp() when building PPC MachineInstrs";
|
||||
abort ();
|
||||
abort();
|
||||
return;
|
||||
case MachineOperand::MO_GlobalAddress:
|
||||
if (!elideOffsetKeyword) {
|
||||
@ -507,7 +507,7 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
|
||||
|
||||
if (Opcode == PPC32::MovePCtoLR) {
|
||||
O << "mflr r0\n";
|
||||
O << "\tbcl 20,31,L" << CurrentFnName << "$pb\n";
|
||||
O << "\tbc 20,31,L" << CurrentFnName << "$pb\n";
|
||||
O << "L" << CurrentFnName << "$pb:\n";
|
||||
return;
|
||||
}
|
||||
|
@ -423,7 +423,7 @@ void Printer::printOp(const MachineOperand &MO,
|
||||
}
|
||||
case MachineOperand::MO_PCRelativeDisp:
|
||||
std::cerr << "Shouldn't use addPCDisp() when building PPC MachineInstrs";
|
||||
abort ();
|
||||
abort();
|
||||
return;
|
||||
case MachineOperand::MO_GlobalAddress:
|
||||
if (!elideOffsetKeyword) {
|
||||
@ -507,7 +507,7 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
|
||||
|
||||
if (Opcode == PPC32::MovePCtoLR) {
|
||||
O << "mflr r0\n";
|
||||
O << "\tbcl 20,31,L" << CurrentFnName << "$pb\n";
|
||||
O << "\tbc 20,31,L" << CurrentFnName << "$pb\n";
|
||||
O << "L" << CurrentFnName << "$pb:\n";
|
||||
return;
|
||||
}
|
||||
|
@ -423,7 +423,7 @@ void Printer::printOp(const MachineOperand &MO,
|
||||
}
|
||||
case MachineOperand::MO_PCRelativeDisp:
|
||||
std::cerr << "Shouldn't use addPCDisp() when building PPC MachineInstrs";
|
||||
abort ();
|
||||
abort();
|
||||
return;
|
||||
case MachineOperand::MO_GlobalAddress:
|
||||
if (!elideOffsetKeyword) {
|
||||
@ -507,7 +507,7 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
|
||||
|
||||
if (Opcode == PPC32::MovePCtoLR) {
|
||||
O << "mflr r0\n";
|
||||
O << "\tbcl 20,31,L" << CurrentFnName << "$pb\n";
|
||||
O << "\tbc 20,31,L" << CurrentFnName << "$pb\n";
|
||||
O << "L" << CurrentFnName << "$pb:\n";
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user