This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi 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: Dealed with gcc bug 36834 - structure return ABI for windows targets differs from native MSVC ?


Well,

you can probe for this feature as the unit test does.  In one case you
should see the assembly instruction 'ret 0x4' (for old behavior), and
otherwise you will simply see 'ret' instruction in the assembly
output.

Hope this helps,
Kai

2011/7/9 Just Fill Bugs <mozbugbox@yahoo.com.au>:
> On 07/09/2011 04:44 PM, Kai Tietz wrote:
>>
>> Yes, beginning with 4.7 version of gcc the proper caller pops
>> aggregate return pointer ABI automatically enabled for mingw 32-bit
>> target. ?To get old behavior of callee pops aggreate return pointer
>> (gnuish variant of 32-bit IA ABI), you need to specify attribute to
>> function manually - as described in PR/36834.
>>
>
> My question is, can libffi automagically detect the two different behavior
> and correctly call a dll compiled with older gcc compilers?
>
> It seems the gcc bug commit include some unit test that can somehow detect
> the different return behaviors. But I really don't know a thing about
> compiler or ABI. :(
>
>



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


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