Mac OS X x86-64 lower 4G address is not available.

llvm-svn: 40502
This commit is contained in:
Evan Cheng 2007-07-25 23:41:36 +00:00
parent 952aa6988b
commit 630c1f75b8
1 changed files with 2 additions and 1 deletions

View File

@ -615,7 +615,8 @@ bool X86DAGToDAGISel::MatchAddress(SDOperand N, X86ISelAddressMode &AM,
SDOperand N0 = N.getOperand(0);
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(N0)) {
GlobalValue *GV = G->getGlobal();
bool isAbs32 = !is64Bit || isStatic;
// Mac OS X X86-64 lower 4G address is not available.
bool isAbs32 = !is64Bit || (isStatic && !Subtarget->isTargetDarwin());
if (isAbs32 || isRoot) {
AM.GV = GV;
AM.Disp += G->getOffset();