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

Commit

Permalink
Revert "Add a workaround to the problem where the amd64 JIT would mak…
Browse files Browse the repository at this point in the history
…e all calls as register indirect."

This reverts commit 2aaa79a.

Revert this as it breaks for calls to native code with a non 32bit address.
  • Loading branch information
vargaz committed Jul 30, 2017
1 parent 6aa74ae commit 21492ec
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/Target/X86/X86ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3046,17 +3046,6 @@ X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
// through a register, since the call instruction's 32-bit
// pc-relative offset may not be large enough to hold the whole
// address.

//
// This is a mono specific hack to force llvm to generate direct calls even if
// the code model is Large.
//
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) {
unsigned char OpFlags = 0;
const GlobalValue *GV = G->getGlobal();
Callee = DAG.getTargetGlobalAddress(GV, dl, getPointerTy(),
G->getOffset(), OpFlags);
}
} else if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) {
// If the callee is a GlobalAddress node (quite common, every direct call
// is) turn it into a TargetGlobalAddress node so that legalize doesn't hack
Expand Down

0 comments on commit 21492ec

Please sign in to comment.