diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2005-06-27 21:02:56 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-06-27 21:02:56 +0000 |
commit | 02c318e1d24573885c5134f886d0c2106e1e705e (patch) | |
tree | 16feab11ee74c634d9b3d9a3052c7e0bc4aae56d /lib/Target/Alpha/AlphaISelPattern.cpp | |
parent | d4653b18527c3a030373b71bad71fec745f5dc54 (diff) |
generate address of constant pool entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22298 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaISelPattern.cpp')
-rw-r--r-- | lib/Target/Alpha/AlphaISelPattern.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/Target/Alpha/AlphaISelPattern.cpp b/lib/Target/Alpha/AlphaISelPattern.cpp index bdd7c5d095..6d2cfc63f1 100644 --- a/lib/Target/Alpha/AlphaISelPattern.cpp +++ b/lib/Target/Alpha/AlphaISelPattern.cpp @@ -1520,11 +1520,15 @@ unsigned AlphaISel::SelectExpr(SDOperand N) { BuildMI(BB, Alpha::BIS, 2, Result).addReg(Alpha::R30).addReg(Alpha::R30); return Result; -// case ISD::ConstantPool: -// Tmp1 = cast<ConstantPoolSDNode>(N)->getIndex(); -// AlphaLowering.restoreGP(BB); -// BuildMI(BB, Alpha::LDQ_SYM, 1, Result).addConstantPoolIndex(Tmp1); -// return Result; + case ISD::ConstantPool: + Tmp1 = cast<ConstantPoolSDNode>(N)->getIndex(); + AlphaLowering.restoreGP(BB); + Tmp2 = MakeReg(MVT::i64); + BuildMI(BB, Alpha::LDAHr, 2, Tmp2).addConstantPoolIndex(Tmp1) + .addReg(Alpha::R29); + BuildMI(BB, Alpha::LDAr, 2, Result).addConstantPoolIndex(Tmp1) + .addReg(Tmp2); + return Result; case ISD::FrameIndex: BuildMI(BB, Alpha::LDA, 2, Result) |