From 3e65f25191da23215ba847ed49d10af5cf207490 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Fri, 9 Apr 2010 08:58:00 +0000 Subject: cygming.h (TARGET_OS_CPP_BUILTINS): Add __thiscall and _thiscall as predefined macros. 2010-04-09 Kai Tietz * 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. From-SVN: r158155 --- gcc/doc/extend.texi | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gcc/doc') diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 78d9093..0e499cc 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -2323,6 +2323,18 @@ and other typed arguments are passed on the stack. The called function will pop the arguments off the stack. If the number of arguments is variable all arguments are pushed on the stack. +@item thiscall +@cindex functions that pop the argument stack on the 386 +On the Intel 386, the @code{thiscall} attribute causes the compiler to +pass the first argument (if of integral type) in the register ECX. +Subsequent and other typed arguments are passed on the stack. The called +function will pop the arguments off the stack. +If the number of arguments is variable all arguments are pushed on the +stack. +The @code{thiscall} attribute is intended for C++ non-static member functions. +As gcc extension this calling convention can be used for C-functions +and for static member methods. + @item format (@var{archetype}, @var{string-index}, @var{first-to-check}) @cindex @code{format} function attribute @opindex Wformat -- cgit v1.1