Changes in directory llvm/lib/Target/ARM:
ARMAsmPrinter.cpp updated: 1.22 -> 1.23 ARMISelDAGToDAG.cpp updated: 1.70 -> 1.71 ARMInstrInfo.td updated: 1.56 -> 1.57 --- Log message: expand ISD::SHL_PARTS, ISD::SRA_PARTS and ISD::SRL_PARTS --- Diffs of the changes: (+20 -8) ARMAsmPrinter.cpp | 3 +-- ARMISelDAGToDAG.cpp | 15 +++++++++++---- ARMInstrInfo.td | 10 ++++++++-- 3 files changed, 20 insertions(+), 8 deletions(-) Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.22 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.23 --- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.22 Wed Oct 4 22:01:21 2006 +++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Mon Oct 16 16:10:32 2006 @@ -216,8 +216,7 @@ } break; case MachineOperand::MO_ExternalSymbol: - assert(0 && "not implemented"); - abort(); + O << TAI->getGlobalPrefix() << MO.getSymbolName(); break; case MachineOperand::MO_ConstantPoolIndex: O << TAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber() Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.70 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.71 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.70 Sat Oct 14 12:59:54 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Mon Oct 16 16:10:32 2006 @@ -72,6 +72,10 @@ setOperationAction(ISD::BRCOND, MVT::Other, Expand); + setOperationAction(ISD::SHL_PARTS, MVT::i32, Expand); + setOperationAction(ISD::SRA_PARTS, MVT::i32, Expand); + setOperationAction(ISD::SRL_PARTS, MVT::i32, Expand); + setOperationAction(ISD::VASTART, MVT::Other, Custom); setOperationAction(ISD::VAEND, MVT::Other, Expand); @@ -321,11 +325,14 @@ Chain = DAG.getNode(ISD::TokenFactor, MVT::Other, &MemOpChains[0], MemOpChains.size()); - // 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 the callee is a GlobalAddress node (quite common, every direct call is) + // turn it into a TargetGlobalAddress node so that legalize doesn't hack it. + // Likewise ExternalSymbol -> TargetExternalSymbol. + assert(Callee.getValueType() == MVT::i32); if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) - Callee = DAG.getTargetGlobalAddress(G->getGlobal(), Callee.getValueType()); + Callee = DAG.getTargetGlobalAddress(G->getGlobal(), MVT::i32); + else if (ExternalSymbolSDNode *E = dyn_cast<ExternalSymbolSDNode>(Callee)) + Callee = DAG.getTargetExternalSymbol(E->getSymbol(), MVT::i32); // If this is a direct call, pass the chain and the callee. assert (Callee.Val); Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.56 llvm/lib/Target/ARM/ARMInstrInfo.td:1.57 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.56 Mon Oct 16 13:39:22 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Oct 16 16:10:32 2006 @@ -128,8 +128,8 @@ def bx: InstARM<(ops), "bx r14", [(retflag)]>; } -let Defs = [R0, R1, R2, R3, R14] in { - def bl: InstARM<(ops i32imm:$func, variable_ops), "bl $func", [(ARMcall tglobaladdr:$func)]>; +let noResults = 1, Defs = [R0, R1, R2, R3, R14] in { + def bl: InstARM<(ops i32imm:$func, variable_ops), "bl $func", []>; } def ldr : InstARM<(ops IntRegs:$dst, memri:$addr), @@ -286,3 +286,9 @@ def FLDD : InstARM<(ops DFPRegs:$dst, IntRegs:$addr), "fldd $dst, $addr", [(set DFPRegs:$dst, (load IntRegs:$addr))]>; + +def : Pat<(ARMcall tglobaladdr:$dst), + (bl tglobaladdr:$dst)>; + +def : Pat<(ARMcall texternalsym:$dst), + (bl texternalsym:$dst)>; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits