diff options
| author | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2007-12-21 12:19:44 +0000 |
|---|---|---|
| committer | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2007-12-21 12:19:44 +0000 |
| commit | 80c741e16030558570c7d19233b68f367d22d0af (patch) | |
| tree | f478a74ed9e4bd8ed515cac663872f4b422db18b /llvm/lib/Target/PowerPC/PPCISelLowering.cpp | |
| parent | 78c460c8c485a9b1ae08c1f7f07a5f303c8711da (diff) | |
| download | bcm5719-llvm-80c741e16030558570c7d19233b68f367d22d0af.tar.gz bcm5719-llvm-80c741e16030558570c7d19233b68f367d22d0af.zip | |
Enable EH for linux/ppc32 targets
llvm-svn: 45281
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 5dbe801591c..411899c45e0 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -167,14 +167,12 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM) // Support label based line numbers. setOperationAction(ISD::LOCATION, MVT::Other, Expand); setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand); - if (!TM.getSubtarget<PPCSubtarget>().isDarwin()) { - setOperationAction(ISD::LABEL, MVT::Other, Expand); - } else { - setOperationAction(ISD::EXCEPTIONADDR, MVT::i64, Expand); - setOperationAction(ISD::EHSELECTION, MVT::i64, Expand); - setOperationAction(ISD::EXCEPTIONADDR, MVT::i32, Expand); - setOperationAction(ISD::EHSELECTION, MVT::i32, Expand); - } + + setOperationAction(ISD::EXCEPTIONADDR, MVT::i64, Expand); + setOperationAction(ISD::EHSELECTION, MVT::i64, Expand); + setOperationAction(ISD::EXCEPTIONADDR, MVT::i32, Expand); + setOperationAction(ISD::EHSELECTION, MVT::i32, Expand); + // We want to legalize GlobalAddress and ConstantPool nodes into the // appropriate instructions to materialize the address. @@ -1771,9 +1769,9 @@ static SDOperand LowerCALL(SDOperand Op, SelectionDAG &DAG, // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol // node so that legalize doesn't hack it. - if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) - Callee = DAG.getTargetGlobalAddress(G->getGlobal(), Callee.getValueType()); - else if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee)) + //if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) + // Callee = DAG.getTargetGlobalAddress(G->getGlobal(), Callee.getValueType()); + if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee)) Callee = DAG.getTargetExternalSymbol(S->getSymbol(), Callee.getValueType()); else if (SDNode *Dest = isBLACompatibleAddress(Callee, DAG)) // If this is an absolute destination address, use the munged value. |

