This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch i386]: For 4.6 add support of thiscall calling convention attribute for x86
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Kai Tietz <ktietz70 at googlemail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Date: Wed, 7 Apr 2010 16:35:15 +0200 (CEST)
- Subject: Re: [patch i386]: For 4.6 add support of thiscall calling convention attribute for x86
- References: <90baa01f1003200254x49d705fbl5e4cf0f45700d9d1@mail.gmail.com> <4BA4C266.1090209@gmail.com> <90baa01f1003200529i7a7c98f3r64fe5add7fe2c9eb@mail.gmail.com> <4BA4CB96.8090305@gmail.com> <90baa01f1003200610s5ba14ed1hd336fd3f243a020c@mail.gmail.com> <4BA4D646.3030708@gmail.com> <90baa01f1003261237j7fa7b26fg8fb4fb9d0c0c60@mail.gmail.com> <v2v90baa01f1004061118k8fdceb8h84f28c9a86dc85f2@mail.gmail.com> <4BBB83BE.5090302@gmail.com>
On Tue, 6 Apr 2010, Uros Bizjak wrote:
> +@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++ member this-methods.
> +As gcc extension this calling convention can be used for C-functions
> +and for static member methods.
> +
>
> I have CC'd Gerald, so he can say something about the grammar in the
> above text.
Dave looks like a better person for that than me ;-), and he has done
a very nice review.
The one additional comment/question I have is whether it is "on the 386"
and "the Intel 386" or just "on 386" and "Intel 386". Also, what is the
official name for that? Perhaps say x86, or is this specific to 386 as
opposed to later generations?
(I don't want to hold off application of this patch, just asking some
questions.)
Gerald