On Fri, Apr 01, 2011 at 07:39:13PM +0200, Kai Tietz wrote: > this patch sets for c++ methods, which are not stdarg ones, the > default calling-convention to thiscall for ms_abi 32-bit, as vendor > specific compiler does.
I think it might be worthwhile to pull this pattern: > @@ -5500,7 +5524,8 @@ ix86_function_regparm (const_tree type, > if (lookup_attribute ("fastcall", TYPE_ATTRIBUTES (type))) > return 2; > > - if (lookup_attribute ("thiscall", TYPE_ATTRIBUTES (type))) > + if (lookup_attribute ("thiscall", TYPE_ATTRIBUTES (type)) > + || ix86_is_msabi_thiscall (type)) into a separate function.? That function could also be used for negative tests like this one: > @@ -9799,7 +9826,8 @@ find_drap_reg (void) > && !lookup_attribute ("fastcall", > TYPE_ATTRIBUTES (TREE_TYPE (decl))) > && !lookup_attribute ("thiscall", > - TYPE_ATTRIBUTES (TREE_TYPE (decl)))) > + TYPE_ATTRIBUTES (TREE_TYPE (decl))) > + && ! ix86_is_msabi_thiscall (TREE_TYPE (decl))) WDYT? -Nathan