* config/i386/cygming.h (TARGET_OS_CPP_BUILTINS): Add
__thiscall and _thiscall as predefined macros.
* config/i386/i386.c (ix86_handle_cconv_attribute): Add
thiscall attribute handling.
(ix86_comp_type_attributes): Likewise.
(ix86_function_regparm): Likewise.
(ix86_return_pops_args): Likewise.
(init_cumulative_args): Likewise.
(find_drap_reg): Likewise.
(ix86_static_chain): Likewise.
(x86_this_parameter): Likewise.
(x86_output_mi_thunk): Likewise.
(ix86_attribute_table): Add description for thiscall attribute.
* config/i386/i386.h (ix86_args): Adjust comment for member
fastcall.
* doc/extend.texi: Add documentation for thiscall.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158155
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-04-09 Kai Tietz <kai.tietz@onevision.com>
+
+ * config/i386/cygming.h (TARGET_OS_CPP_BUILTINS): Add
+ __thiscall and _thiscall as predefined macros.
+ * config/i386/i386.c (ix86_handle_cconv_attribute): Add
+ thiscall attribute handling.
+ (ix86_comp_type_attributes): Likewise.
+ (ix86_function_regparm): Likewise.
+ (ix86_return_pops_args): Likewise.
+ (init_cumulative_args): Likewise.
+ (find_drap_reg): Likewise.
+ (ix86_static_chain): Likewise.
+ (x86_this_parameter): Likewise.
+ (x86_output_mi_thunk): Likewise.
+ (ix86_attribute_table): Add description for thiscall attribute.
+ * config/i386/i386.h (ix86_args): Adjust comment for member
+ fastcall.
+ * doc/extend.texi: Add documentation for thiscall.
+
2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/28584
2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/28584
if (lookup_attribute ("fastcall", TYPE_ATTRIBUTES (type)))
regno = aggr ? DX_REG : CX_REG;
if (lookup_attribute ("fastcall", TYPE_ATTRIBUTES (type)))
regno = aggr ? DX_REG : CX_REG;
+ /* ???: To be verified. It is not absolutely clear how aggregates
+ have to be treated for thiscall. We assume that they are
+ identical to fastcall. */
else if (lookup_attribute ("thiscall", TYPE_ATTRIBUTES (type)))
else if (lookup_attribute ("thiscall", TYPE_ATTRIBUTES (type)))
- {
- regno = CX_REG;
- if (aggr)
- return gen_rtx_MEM (SImode,
- plus_constant (stack_pointer_rtx, 4));
- }
+ regno = aggr ? DX_REG : CX_REG;