Skip to content
This repository was archived by the owner on Dec 20, 2019. It is now read-only.

Commit 21492ec

Browse files
committed
Revert "Add a workaround to the problem where the amd64 JIT would make all calls as register indirect."
This reverts commit 2aaa79a. Revert this as it breaks for calls to native code with a non 32bit address.
1 parent 6aa74ae commit 21492ec

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/Target/X86/X86ISelLowering.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3046,17 +3046,6 @@ X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
30463046
// through a register, since the call instruction's 32-bit
30473047
// pc-relative offset may not be large enough to hold the whole
30483048
// address.
3049-
3050-
//
3051-
// This is a mono specific hack to force llvm to generate direct calls even if
3052-
// the code model is Large.
3053-
//
3054-
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) {
3055-
unsigned char OpFlags = 0;
3056-
const GlobalValue *GV = G->getGlobal();
3057-
Callee = DAG.getTargetGlobalAddress(GV, dl, getPointerTy(),
3058-
G->getOffset(), OpFlags);
3059-
}
30603049
} else if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) {
30613050
// If the callee is a GlobalAddress node (quite common, every direct call
30623051
// is) turn it into a TargetGlobalAddress node so that legalize doesn't hack

0 commit comments

Comments
 (0)