comparison gen/tocall.cpp @ 1446:fe151804995a

Improve ABI conformance on x86 by passing the `sret` parameter in EAX if there's no `this`.
author Frits van Bommel <fvbommel wxs.nl>
date Sun, 31 May 2009 12:43:59 +0200
parents 42bd767ec5a4
children a5526b7a5ae6
comparison
equal deleted inserted replaced
1445:1dc1232aa91a 1446:fe151804995a
320 args.push_back(retvar); 320 args.push_back(retvar);
321 321
322 // add attrs for hidden ptr 322 // add attrs for hidden ptr
323 Attr.Index = 1; 323 Attr.Index = 1;
324 Attr.Attrs = tf->fty.arg_sret->attrs; 324 Attr.Attrs = tf->fty.arg_sret->attrs;
325 assert((Attr.Attrs & llvm::Attribute::StructRet) && "Sret arg not sret?"); 325 assert((Attr.Attrs & (llvm::Attribute::StructRet | llvm::Attribute::InReg))
326 && "Sret arg not sret or inreg?");
326 attrs.push_back(Attr); 327 attrs.push_back(Attr);
327 } 328 }
328 329
329 // then comes a context argument... 330 // then comes a context argument...
330 if(thiscall || delegatecall || nestedcall) 331 if(thiscall || delegatecall || nestedcall)