Tailcalls require stubs to be emitted. Otherwise, the compilation callback

doesn't know who 'called' it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22136 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2005-05-19 05:54:33 +00:00
parent 6a5d1d42b7
commit 16cb6f82eb
2 changed files with 16 additions and 9 deletions

View File

@@ -3918,7 +3918,7 @@ void ISel::EmitFastCCToFastCCTailCall(SDNode *TailCallNode) {
if (!isDirect) {
BuildMI(BB, X86::TAILJMPr, 1).addReg(CalleeReg);
} else if (GlobalAddressSDNode *GASD = dyn_cast<GlobalAddressSDNode>(Callee)){
BuildMI(BB, X86::TAILJMPd, 1).addGlobalAddress(GASD->getGlobal(),true);
BuildMI(BB, X86::TAILJMPd, 1).addGlobalAddress(GASD->getGlobal(), true);
} else {
ExternalSymbolSDNode *ESSDN = cast<ExternalSymbolSDNode>(Callee);
BuildMI(BB, X86::TAILJMPd, 1).addExternalSymbol(ESSDN->getSymbol(), true);