summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-03-10 02:17:22 +0000
committerDale Johannesen <dalej@apple.com>2008-03-10 02:17:22 +0000
commit4e622ec86d8b4b8e40dcf3c8dcfd405190a31bbb (patch)
tree5733d27417818263b54a8c9b5c4263ee2377ec88 /llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
parent148562f13e787d7c4d5862ee473234e4bf0a1258 (diff)
downloadbcm5719-llvm-4e622ec86d8b4b8e40dcf3c8dcfd405190a31bbb.tar.gz
bcm5719-llvm-4e622ec86d8b4b8e40dcf3c8dcfd405190a31bbb.zip
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.) llvm-svn: 48122
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp b/llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
index 591e9aa0eec..6b9b31b548f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
+++ b/llvm/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";
OpenPOWER on IntegriCloud