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]

Fwd: [patch i386]: Fix PR/38227 gcc fails to correctly pass arguments with ms_abi function pointers


Sorry, I missed to sent this to gcc-patches


---------- Forwarded message ----------
From: Kai Tietz <ktietz70@googlemail.com>
Date: 2008/11/24
Subject: Re: [patch i386]: Fix PR/38227 gcc fails to correctly pass
arguments with ms_abi function pointers
To: Uros Bizjak <ubizjak@gmail.com>


2008/11/24 Kai Tietz <ktietz70@googlemail.com>:
> 2008/11/24 Uros Bizjak <ubizjak@gmail.com>:
>> On Sun, Nov 23, 2008 at 11:09 PM, Kai Tietz <ktietz70@googlemail.com> wrote:
>>
>>>>> You need to look into other targets implementation of REG_PARM_STACK_SPACE
>>>>> to see if they will be confused by a type parameter.
>>>>
>>>> AFAIK only i386.h uses the REG_PARM_STACK_SPACE argument, all other targets
>>>> ignore it.
>>>
>>> By a grep through all targets, I can agree on this.
>>
>> Can you also update the documentation?
>>
>> Thanks,
>> Uros.
>>

I have found that there were additional issue about the missing fndecl
in calls.c context. By this the stack space wasn't allocated proper.
So I need to extend my patch a bit.

Ok, the complet patch so far

ChangeLog

2008-11-24  Kai Tietz  <kai.tietz@onevision.com>

       PR/38227
       * calls.c (expand_call): Pass to REG_PARM_STACK_SPACE
       the type of the function, when there is no FUNCTION_DECL available.
       OUTGOING_REG_PARM_STACK_SPACE pass fntype, when no fndecl is available.
       (compute_argument_block_size): Add fntype argument.
       OUTGOING_REG_PARM_STACK_SPACE pass fntype, when no fndecl is available.
       (emit_library_call_value_1): Likewise.
       OUTGOING_REG_PARM_STACK_SPACE pass fntype, when no fndecl is available.
       * config/i386/i386.c (ix86_reg_parm_stack_space): Handle function types.
       * doc/tm.texi (REG_PARM_STACK_SPACE): Adjust documentation.

 For testsuite
 2008-11-24  Kai Tietz  <kai.tietz@onevision.com>
       * gcc.dg/callabi/func-indirect.c: New.


Ok for apply?

Cheers,
Kai



--
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination



-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

Attachment: pr38227.diff
Description: Binary data


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