From ec87399dacd32d8f611fc85ad3836e347f87ccbb Mon Sep 17 00:00:00 2001 From: Nate Begeman Date: Wed, 30 Mar 2005 01:45:43 +0000 Subject: [PATCH] Fix external symbol printing in the AsmPrinter. Tell the ISel that we don't support things like memcpy directly. This allows a handful of the Shootout programs to work, yay! llvm-svn: 20939 --- lib/Target/PowerPC/PPC32ISelPattern.cpp | 6 ++++++ lib/Target/PowerPC/PowerPCAsmPrinter.cpp | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/Target/PowerPC/PPC32ISelPattern.cpp b/lib/Target/PowerPC/PPC32ISelPattern.cpp index 823fef9b257..451ff031c6b 100644 --- a/lib/Target/PowerPC/PPC32ISelPattern.cpp +++ b/lib/Target/PowerPC/PPC32ISelPattern.cpp @@ -47,6 +47,10 @@ namespace { addRegisterClass(MVT::f32, PPC32::FPRCRegisterClass); addRegisterClass(MVT::f64, PPC32::FPRCRegisterClass); + setOperationAction(ISD::MEMMOVE, MVT::Other, Expand); + setOperationAction(ISD::MEMSET, MVT::Other, Expand); + setOperationAction(ISD::MEMCPY, MVT::Other, Expand); + computeRegisterProperties(); } @@ -372,6 +376,7 @@ LowerVAArgNext(bool isVANext, SDOperand Chain, SDOperand VAList, std::pair PPC32TargetLowering:: LowerFrameReturnAddress(bool isFrameAddress, SDOperand Chain, unsigned Depth, SelectionDAG &DAG) { + assert(0 && "LowerFrameReturnAddress unimplemented"); abort(); } @@ -1072,6 +1077,7 @@ unsigned ISel::SelectExpr(SDOperand N) { case ISD::FP_TO_UINT: case ISD::FP_TO_SINT: + assert(0 && "FP_TO_S/UINT unimplemented"); abort(); case ISD::SETCC: diff --git a/lib/Target/PowerPC/PowerPCAsmPrinter.cpp b/lib/Target/PowerPC/PowerPCAsmPrinter.cpp index a50a437893b..025ce9824b3 100644 --- a/lib/Target/PowerPC/PowerPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PowerPCAsmPrinter.cpp @@ -349,7 +349,13 @@ void PowerPCAsmPrinter::printOp(const MachineOperand &MO, bool IsCallOp) { return; case MachineOperand::MO_ExternalSymbol: - O << MO.getSymbolName(); + if (IsCallOp) { + std::string Name(GlobalPrefix); Name += MO.getSymbolName(); + FnStubs.insert(Name); + O << "L" << Name << "$stub"; + return; + } + O << GlobalPrefix << MO.getSymbolName(); return; case MachineOperand::MO_GlobalAddress: {