diff options
author | Dale Johannesen <dalej@apple.com> | 2008-03-10 02:17:22 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-03-10 02:17:22 +0000 |
commit | b8cafe3427a168414400e5dfcbea78996792d2c3 (patch) | |
tree | aedcf29317486800a015207db85b4e61a90ca453 /lib/CodeGen/SelectionDAG/CallingConvLower.cpp | |
parent | 29c8c370457fc6983bec940168c337a85d5a1e07 (diff) |
Increase ISD::ParamFlags to 64 bits. Increase the ByValSize
field to 32 bits, thus enabling correct handling of ByVal
structs bigger than 0x1ffff. Abstract interface a bit.
Fixes gcc.c-torture/execute/pr23135.c and
gcc.c-torture/execute/pr28982b.c in gcc testsuite (were ICE'ing
on ppc32, quietly producing wrong code on x86-32.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48122 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/CallingConvLower.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/CallingConvLower.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/CallingConvLower.cpp b/lib/CodeGen/SelectionDAG/CallingConvLower.cpp index 591e9aa0ee..6b9b31b548 100644 --- a/lib/CodeGen/SelectionDAG/CallingConvLower.cpp +++ b/lib/CodeGen/SelectionDAG/CallingConvLower.cpp @@ -35,7 +35,7 @@ CCState::CCState(unsigned CC, bool isVarArg, const TargetMachine &tm, void CCState::HandleByVal(unsigned ValNo, MVT::ValueType ValVT, MVT::ValueType LocVT, CCValAssign::LocInfo LocInfo, int MinSize, int MinAlign, - unsigned ArgFlags) { + ISD::ParamFlags::ParamFlagsTy ArgFlags) { unsigned Align = 1 << ((ArgFlags & ISD::ParamFlags::ByValAlign) >> ISD::ParamFlags::ByValAlignOffs); unsigned Size = (ArgFlags & ISD::ParamFlags::ByValSize) >> @@ -66,7 +66,8 @@ void CCState::AnalyzeFormalArguments(SDNode *TheArgs, CCAssignFn Fn) { for (unsigned i = 0; i != NumArgs; ++i) { MVT::ValueType ArgVT = TheArgs->getValueType(i); SDOperand FlagOp = TheArgs->getOperand(3+i); - unsigned ArgFlags = cast<ConstantSDNode>(FlagOp)->getValue(); + ISD::ParamFlags::ParamFlagsTy ArgFlags = + cast<ConstantSDNode>(FlagOp)->getValue(); if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) { cerr << "Formal argument #" << i << " has unhandled type " << MVT::getValueTypeString(ArgVT) << "\n"; @@ -98,7 +99,8 @@ void CCState::AnalyzeCallOperands(SDNode *TheCall, CCAssignFn Fn) { for (unsigned i = 0; i != NumOps; ++i) { MVT::ValueType ArgVT = TheCall->getOperand(5+2*i).getValueType(); SDOperand FlagOp = TheCall->getOperand(5+2*i+1); - unsigned ArgFlags =cast<ConstantSDNode>(FlagOp)->getValue(); + ISD::ParamFlags::ParamFlagsTy ArgFlags = + cast<ConstantSDNode>(FlagOp)->getValue(); if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) { cerr << "Call operand #" << i << " has unhandled type " << MVT::getValueTypeString(ArgVT) << "\n"; |