This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR target/34001: Incorrect x86 fastcall behavior
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "H.J. Lu" <hjl at lucon dot org>
- Cc: gcc-patches at gcc dot gnu dot org, jh at suse dot cz, ubizjak at gmail dot com
- Date: Fri, 9 Nov 2007 18:06:17 +0100
- Subject: Re: PATCH: PR target/34001: Incorrect x86 fastcall behavior
- References: <20071109170040.GA12383@lucon.org>
On Nov 9, 2007 6:00 PM, H.J. Lu <hjl@lucon.org> wrote:
> From
>
> http://msdn2.microsoft.com/en-us/library/6xa169sk(VS.80).aspx
>
> "The first two DWORD or smaller arguments are passed in ECX and EDX
> registers; all other arguments are passed right to left."
>
> But it isn't clear if it applies to structure/union. We tested all MS
> compilers we have and verified that the above doesn't apply to
> structure/union. To make fastcall compatible with MS compilers, we
> should only put scalar arguments in ECX and EDX.
This would be an ABI change from previous releases. Regardless of
whether we want to do this, an entry for the 4.3 changes document
should be added.
Richard.