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

2012-11-28 Thread Richard Henderson
On 11/28/2012 10:52 AM, Kai Tietz wrote: > 2012-11-28 Kai Tietz > > PR target/55171 > * i386.c (get_scratch_register_on_entry): Handle > thiscall-convention. > (split_stack_prologue_scratch_regno): Likewise. > (ix86_static_chain): Likewise. > (x86_o

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

2012-11-28 Thread Kai Tietz
Fine. Here is a adjusted version which keeps old abi behavior for chain-registers. 2012-11-28 Kai Tietz PR target/55171 * i386.c (get_scratch_register_on_entry): Handle thiscall-convention. (split_stack_prologue_scratch_regno): Likewise. (ix86_static_chai

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

2012-11-28 Thread Richard Henderson
On 11/28/2012 09:53 AM, Kai Tietz wrote: > 2012/11/28 Richard Henderson : >> 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 e

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

2012-11-28 Thread Kai Tietz
2012/11/28 Richard Henderson : > 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 >>

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

2012-11-28 Thread Richard Henderson
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. > @

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

2012-11-25 Thread Kai Tietz
Hi, the following patch adjusts used registers for thiscall-calling convention thunks, so that there aren't register-collisions. Issue was that thiscall-convention has different register-usage as regparam, but it wasn't handled. ChangeLog 2012-11-25 Kai Tietz PR target/55171