[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Evan Cheng
evan.cheng at apple.com
Sat Dec 17 01:13:56 PST 2005
Changes in directory llvm/lib/Target/X86:
X86ISelDAGToDAG.cpp updated: 1.14 -> 1.15
---
Log message:
Darwin API issue: indirect load of external and weak symbols.
---
Diffs of the changes: (+8 -3)
X86ISelDAGToDAG.cpp | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.14 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.15
--- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.14 Fri Dec 16 20:02:50 2005
+++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Sat Dec 17 03:13:43 2005
@@ -106,7 +106,7 @@
SDOperand &Disp) {
Base = (AM.BaseType == X86ISelAddressMode::FrameIndexBase) ?
CurDAG->getTargetFrameIndex(AM.Base.FrameIndex, MVT::i32) : AM.Base.Reg;
- Scale = getI8Imm (AM.Scale);
+ Scale = getI8Imm(AM.Scale);
Index = AM.IndexReg;
Disp = AM.GV ? CurDAG->getTargetGlobalAddress(AM.GV, MVT::i32, AM.Disp)
: getI32Imm(AM.Disp);
@@ -179,11 +179,16 @@
// not the GV offset field.
if (Subtarget->getIndirectExternAndWeakGlobals() &&
(GV->hasWeakLinkage() || GV->isExternal())) {
- break;
+ AM.Base.Reg =
+ CurDAG->getTargetNode(X86::MOV32rm, MVT::i32, MVT::Other,
+ CurDAG->getRegister(0, MVT::i32),
+ getI8Imm(1), CurDAG->getRegister(0, MVT::i32),
+ CurDAG->getTargetGlobalAddress(GV, MVT::i32),
+ CurDAG->getEntryNode());
} else {
AM.GV = GV;
- return false;
}
+ return false;
}
break;
More information about the llvm-commits
mailing list