diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2005-01-30 20:42:36 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-01-30 20:42:36 +0000 |
commit | 7b2a5270b7613a12fb0b3c12ccdef26367fb8339 (patch) | |
tree | 26fa2818007e6101d9d25a23f0654e5ec55789b9 /lib/Target/Alpha/AlphaISelPattern.cpp | |
parent | b32d785e18c9f9e820e011661f373401298485c5 (diff) |
added fp extend and removed a forgotten assert in more than 6 arg support (should break somewhere else now :) ) and fix an incorrect asm sequence for indirect calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaISelPattern.cpp')
-rw-r--r-- | lib/Target/Alpha/AlphaISelPattern.cpp | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/lib/Target/Alpha/AlphaISelPattern.cpp b/lib/Target/Alpha/AlphaISelPattern.cpp index f654845884..a92aa1b2c6 100644 --- a/lib/Target/Alpha/AlphaISelPattern.cpp +++ b/lib/Target/Alpha/AlphaISelPattern.cpp @@ -307,6 +307,12 @@ unsigned ISel::SelectExprFP(SDOperand N, unsigned Result) Node->dump(); assert(0 && "Node not handled!\n"); + case ISD::FP_EXTEND: + assert (DestType == MVT::f64 && N.getOperand(0).getValueType() == MVT::f32 && "only f32 to f64 conversion supported here"); + Tmp1 = SelectExpr(N.getOperand(0)); + BuildMI(BB, Alpha::CVTST, 1, Result).addReg(Tmp1); + return Result; + case ISD::CopyFromReg: { // Make sure we generate both values. @@ -584,7 +590,7 @@ unsigned ISel::SelectExpr(SDOperand N) { //grab the arguments std::vector<unsigned> argvregs; - assert(Node->getNumOperands() < 8 && "Only 6 args supported"); + //assert(Node->getNumOperands() < 8 && "Only 6 args supported"); for(int i = 2, e = Node->getNumOperands(); i < e; ++i) argvregs.push_back(SelectExpr(N.getOperand(i))); @@ -640,23 +646,23 @@ unsigned ISel::SelectExpr(SDOperand N) { } //build the right kind of call if (GlobalAddressSDNode *GASD = - dyn_cast<GlobalAddressSDNode>(N.getOperand(1))) - { - AlphaLowering.restoreGP(BB); - BuildMI(BB, Alpha::CALL, 1).addGlobalAddress(GASD->getGlobal(),true); - } + dyn_cast<GlobalAddressSDNode>(N.getOperand(1))) + { + AlphaLowering.restoreGP(BB); + BuildMI(BB, Alpha::CALL, 1).addGlobalAddress(GASD->getGlobal(),true); + } else if (ExternalSymbolSDNode *ESSDN = - dyn_cast<ExternalSymbolSDNode>(N.getOperand(1))) - { - AlphaLowering.restoreGP(BB); - BuildMI(BB, Alpha::CALL, 0).addExternalSymbol(ESSDN->getSymbol(), true); - } + dyn_cast<ExternalSymbolSDNode>(N.getOperand(1))) + { + AlphaLowering.restoreGP(BB); + BuildMI(BB, Alpha::CALL, 0).addExternalSymbol(ESSDN->getSymbol(), true); + } else - { - Tmp1 = SelectExpr(N.getOperand(1)); - AlphaLowering.restoreGP(BB); - BuildMI(BB, Alpha::CALL, 1).addReg(Tmp1); - } + { + //no need to restore GP as we are doing an indirect call + Tmp1 = SelectExpr(N.getOperand(1)); + BuildMI(BB, Alpha::JSR, 2, Alpha::R26).addReg(Tmp1).addImm(1); + } //push the result into a virtual register |