mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
PR8918 - When used with MinGW64, LLVM generates a "calll __main" at the
beginning of the "main" function. The assembler complains about the invalid suffix for the 'call' instruction. The right instruction is "callq __main". Patch by KS Sreeram! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122933 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8c3527e7a4
commit
78d15761e4
@ -530,9 +530,12 @@ void X86DAGToDAGISel::PreprocessISelDAG() {
|
||||
void X86DAGToDAGISel::EmitSpecialCodeForMain(MachineBasicBlock *BB,
|
||||
MachineFrameInfo *MFI) {
|
||||
const TargetInstrInfo *TII = TM.getInstrInfo();
|
||||
if (Subtarget->isTargetCygMing())
|
||||
if (Subtarget->isTargetCygMing()) {
|
||||
unsigned CallOp =
|
||||
Subtarget->is64Bit() ? X86::CALL64pcrel32 : X86::CALLpcrel32;
|
||||
BuildMI(BB, DebugLoc(),
|
||||
TII->get(X86::CALLpcrel32)).addExternalSymbol("__main");
|
||||
TII->get(CallOp)).addExternalSymbol("__main");
|
||||
}
|
||||
}
|
||||
|
||||
void X86DAGToDAGISel::EmitFunctionEntryCode() {
|
||||
|
Loading…
Reference in New Issue
Block a user