diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2007-07-26 07:35:15 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2007-07-26 07:35:15 +0000 |
| commit | ce5185b18100dc29acb8200a3a0d1b08e819cc0d (patch) | |
| tree | 9ae293ecb03c2b4c45c54af52be9ed8c0a9a1185 /llvm/lib/Target | |
| parent | a8fc0e527b7ea87b9295da82bfc8a6a5bc551365 (diff) | |
| download | bcm5719-llvm-ce5185b18100dc29acb8200a3a0d1b08e819cc0d.tar.gz bcm5719-llvm-ce5185b18100dc29acb8200a3a0d1b08e819cc0d.zip | |
Same goes for constantpool, etc.
llvm-svn: 40517
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp index 3c9b9c368e0..871ed0e82b5 100644 --- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -613,10 +613,10 @@ bool X86DAGToDAGISel::MatchAddress(SDOperand N, X86ISelAddressMode &AM, if (!Available || (AM.Base.Reg.Val && AM.IndexReg.Val)) { bool isStatic = TM.getRelocationModel() == Reloc::Static; SDOperand N0 = N.getOperand(0); + // Mac OS X X86-64 lower 4G address is not available. + bool isAbs32 = !is64Bit || (isStatic && !Subtarget->isTargetDarwin()); if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(N0)) { GlobalValue *GV = G->getGlobal(); - // 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(); @@ -624,7 +624,7 @@ bool X86DAGToDAGISel::MatchAddress(SDOperand N, X86ISelAddressMode &AM, return false; } } else if (ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(N0)) { - if (!is64Bit || isStatic || isRoot) { + if (isAbs32 || isRoot) { AM.CP = CP->getConstVal(); AM.Align = CP->getAlignment(); AM.Disp += CP->getOffset(); @@ -632,13 +632,13 @@ bool X86DAGToDAGISel::MatchAddress(SDOperand N, X86ISelAddressMode &AM, return false; } } else if (ExternalSymbolSDNode *S =dyn_cast<ExternalSymbolSDNode>(N0)) { - if (isStatic || isRoot) { + if (isAbs32 || isRoot) { AM.ES = S->getSymbol(); AM.isRIPRel = !isStatic; return false; } } else if (JumpTableSDNode *J = dyn_cast<JumpTableSDNode>(N0)) { - if (isStatic || isRoot) { + if (isAbs32 || isRoot) { AM.JT = J->getIndex(); AM.isRIPRel = !isStatic; return false; |

