From d97eea372a63073e0e03377f6d9bd51ba44271ad Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 21 Mar 2008 09:14:45 +0000 Subject: Introduce a new node for holding call argument flags. This is needed by the new legalize types infrastructure which wants to expand the 64 bit constants previously used to hold the flags on 32 bit machines. There are two functional changes: (1) in LowerArguments, if a parameter has the zext attribute set then that is marked in the flags; before it was being ignored; (2) PPC had some bogus code for handling two word arguments when using the ELF 32 ABI, which was hard to convert because of the bogusness. As suggested by the original author (Nicolas Geoffray), I've disabled it for the moment. Tested with "make check" and the Ada ACATS testsuite. llvm-svn: 48640 --- llvm/lib/Target/ARM/ARMISelLowering.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp') diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index 0326ecf43e4..421a03fca00 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -367,13 +367,12 @@ static void HowToPassArgument(MVT::ValueType ObjectVT, unsigned NumGPRs, unsigned StackOffset, unsigned &NeededGPRs, unsigned &NeededStackSize, unsigned &GPRPad, - unsigned &StackPad, ISD::ParamFlags::ParamFlagsTy Flags) { + unsigned &StackPad, ISD::ArgFlagsTy Flags) { NeededStackSize = 0; NeededGPRs = 0; StackPad = 0; GPRPad = 0; - unsigned align = ((Flags & ISD::ParamFlags::OrigAlignment) - >> ISD::ParamFlags::OrigAlignmentOffs); + unsigned align = Flags.getOrigAlign(); GPRPad = NumGPRs % ((align + 3)/4); StackPad = StackOffset % align; unsigned firstGPR = NumGPRs + GPRPad; @@ -422,7 +421,8 @@ SDOperand ARMTargetLowering::LowerCALL(SDOperand Op, SelectionDAG &DAG) { unsigned StackPad; unsigned GPRPad; MVT::ValueType ObjectVT = Op.getOperand(5+2*i).getValueType(); - ISD::ParamFlags::ParamFlagsTy Flags = Op.getConstantOperandVal(5+2*i+1); + ISD::ArgFlagsTy Flags = + cast(Op.getOperand(5+2*i+1))->getArgFlags(); HowToPassArgument(ObjectVT, NumGPRs, NumBytes, ObjGPRs, ObjSize, GPRPad, StackPad, Flags); NumBytes += ObjSize + StackPad; @@ -445,7 +445,8 @@ SDOperand ARMTargetLowering::LowerCALL(SDOperand Op, SelectionDAG &DAG) { std::vector MemOpChains; for (unsigned i = 0; i != NumOps; ++i) { SDOperand Arg = Op.getOperand(5+2*i); - ISD::ParamFlags::ParamFlagsTy Flags = Op.getConstantOperandVal(5+2*i+1); + ISD::ArgFlagsTy Flags = + cast(Op.getOperand(5+2*i+1))->getArgFlags(); MVT::ValueType ArgVT = Arg.getValueType(); unsigned ObjSize; @@ -924,7 +925,8 @@ static SDOperand LowerFORMAL_ARGUMENT(SDOperand Op, SelectionDAG &DAG, unsigned ObjGPRs; unsigned GPRPad; unsigned StackPad; - ISD::ParamFlags::ParamFlagsTy Flags = Op.getConstantOperandVal(ArgNo + 3); + ISD::ArgFlagsTy Flags = + cast(Op.getOperand(ArgNo + 3))->getArgFlags(); HowToPassArgument(ObjectVT, NumGPRs, ArgOffset, ObjGPRs, ObjSize, GPRPad, StackPad, Flags); NumGPRs += GPRPad; -- cgit v1.2.3