This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch i386} Fix PR 55171 - [4.7/4.8 Regression] incorrect virtual thunk on mingw


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]