[llvm-commits] [llvm] r40517 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
Evan Cheng
evan.cheng at apple.com
Thu Jul 26 00:35:15 PDT 2007
Author: evancheng
Date: Thu Jul 26 02:35:15 2007
New Revision: 40517
URL: http://llvm.org/viewvc/llvm-project?rev=40517&view=rev
Log:
Same goes for constantpool, etc.
Modified:
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=40517&r1=40516&r2=40517&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Jul 26 02:35:15 2007
@@ -613,10 +613,10 @@
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 @@
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 @@
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;
More information about the llvm-commits
mailing list