Mac OS X x86-64 lower 4G address is not available.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 25 Jul 2007 23:41:36 +0000 (23:41 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 25 Jul 2007 23:41:36 +0000 (23:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40502 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelDAGToDAG.cpp

index 5eb51361b8f4e1c8419344f8eab2a68c9f895642..3c9b9c368e0c6897c72fb09254f936acc669a0ec 100644 (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();