aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Alpha/AlphaISelPattern.cpp
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-12-24 08:29:32 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-12-24 08:29:32 +0000
commitc687b4874126bb8a302dbf64786d6295e7ed8457 (patch)
treec382dc8a820f6adc6f2e823ad938dd32d8ea1f58 /lib/Target/Alpha/AlphaISelPattern.cpp
parentb6718607c56d854da158abd31b0e7b7758247e51 (diff)
All addressing modes are now exposed. The only remaining relocated forms
are for function prologue. TODO: move external symbols over to using RelLit. : have a pattern that matches constpool|globaladdr : have a pattern that matches (add x imm) -> x, imm or (...) -> ..., 0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25003 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaISelPattern.cpp')
-rw-r--r--lib/Target/Alpha/AlphaISelPattern.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/Target/Alpha/AlphaISelPattern.cpp b/lib/Target/Alpha/AlphaISelPattern.cpp
index 80e18e7325..e6a0664597 100644
--- a/lib/Target/Alpha/AlphaISelPattern.cpp
+++ b/lib/Target/Alpha/AlphaISelPattern.cpp
@@ -744,20 +744,13 @@ unsigned AlphaISel::SelectExpr(SDOperand N) {
else assert(0 && "unknown Lo part");
return Result;
- case ISD::GlobalAddress:
- AlphaLowering.restoreGP(BB);
- has_sym = true;
-
- Reg = Result = MakeReg(MVT::i64);
-
- if (EnableAlphaLSMark)
- BuildMI(BB, Alpha::MEMLABEL, 4).addImm(5).addImm(0).addImm(0)
- .addImm(getUID());
-
+ case AlphaISD::RelLit: {
+ GlobalAddressSDNode *GASD = cast<GlobalAddressSDNode>(N.getOperand(0));
BuildMI(BB, Alpha::LDQl, 2, Result)
- .addGlobalAddress(cast<GlobalAddressSDNode>(N)->getGlobal())
- .addReg(Alpha::R29);
+ .addGlobalAddress(GASD->getGlobal())
+ .addReg(SelectExpr(N.getOperand(1)));
return Result;
+ }
case ISD::ExternalSymbol:
AlphaLowering.restoreGP(BB);