1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00

generate address of constant pool entries

llvm-svn: 22298
This commit is contained in:
Andrew Lenharth 2005-06-27 21:02:56 +00:00
parent 6e30e970ed
commit b80c19b01a
2 changed files with 10 additions and 5 deletions

View File

@ -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)

View File

@ -369,6 +369,7 @@ def LDSr : MForm<0x22, (ops FPRC:$RA, s16imm:$DISP, GPRC:$RB), "lds $RA,$DISP($R
def LDTr : MForm<0x23, (ops FPRC:$RA, s16imm:$DISP, GPRC:$RB), "ldt $RA,$DISP($RB) !gprellow">; //Load T_floating
//Load address, rellocated form
def LDAr : MForm<0x08, (ops GPRC:$RA, s16imm:$DISP, GPRC:$RB), "lda $RA,$DISP($RB) !gprellow">; //Load address
def LDAHr : MForm<0x08, (ops GPRC:$RA, s16imm:$DISP, GPRC:$RB), "ldah $RA,$DISP($RB) !gprelhigh">; //Load address high