This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch i386} Fix PR 55171 - [4.7/4.8 Regression] incorrect virtual thunk on mingw
- From: Richard Henderson <rth at redhat dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 28 Nov 2012 07:57:20 -0800
- Subject: Re: [patch i386} Fix PR 55171 - [4.7/4.8 Regression] incorrect virtual thunk on mingw
- References: <CAEwic4Z9u_wGBqG-g7-E8LHxqkVK9i-DqUNm4+cy5hiaS2X84A@mail.gmail.com>
On 11/25/2012 07:26 AM, Kai Tietz wrote:
> - if ((ccvt & (IX86_CALLCVT_FASTCALL | IX86_CALLCVT_THISCALL)) != 0)
> + if ((ccvt & IX86_CALLCVT_FASTCALL) != 0)
> {
> /* Fastcall functions use ecx/edx for arguments, which leaves
> us with EAX for the static chain.
> @@ -25142,6 +25160,12 @@ ix86_static_chain (const_tree fndecl, bo
> leaves us with EAX for the static chain. */
> regno = AX_REG;
> }
> + else if ((ccvt & IX86_CALLCVT_THISCALL) != 0)
> + {
> + /* Thiscall functions use ecx for arguments, which leaves
> + us with EDX for the static chain. */
> + regno = DX_REG;
> + }
How is this not abi breakage? Why not leave eax as the static chain?
r~