diff options
| author | Andrew Lenharth <andrewl@lenharth.org> | 2005-12-24 08:29:32 +0000 |
|---|---|---|
| committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-12-24 08:29:32 +0000 |
| commit | 5b18ed9e60296586865ccd32c93c59c80ea9dd22 (patch) | |
| tree | 24d9462b221e0769006e71495fe392ffca7b89fb /llvm/lib/Target/Alpha/AlphaISelPattern.cpp | |
| parent | b9aaea3564eff258fcc89488469443b02d6b7c21 (diff) | |
| download | bcm5719-llvm-5b18ed9e60296586865ccd32c93c59c80ea9dd22.tar.gz bcm5719-llvm-5b18ed9e60296586865ccd32c93c59c80ea9dd22.zip | |
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
llvm-svn: 25003
Diffstat (limited to 'llvm/lib/Target/Alpha/AlphaISelPattern.cpp')
| -rw-r--r-- | llvm/lib/Target/Alpha/AlphaISelPattern.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaISelPattern.cpp b/llvm/lib/Target/Alpha/AlphaISelPattern.cpp index 80e18e7325b..e6a06645975 100644 --- a/llvm/lib/Target/Alpha/AlphaISelPattern.cpp +++ b/llvm/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); |

