question about gcc's __builtin_return

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

question about gcc's __builtin_return

Lloyd Dupont-2
I need to 'forward function call' for a language binding I'm writting (ObjectiveC-.NET)
I have a problem with _builtin_return which is reproduced in the simple attached sample.
 
While it works well with integeter, char, type of register size or less, I have problem with bigger values, such as float, double, struct.....
 
anyone could shed some light?

simple.c (1K) Download Attachment
simple.cs (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: question about gcc's __builtin_return

Lloyd Dupont-2
BTW, I used this GCC:
Reading specs from C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable
-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --e
nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-ja
va-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchroniz
ation --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.2 (mingw-special)
----- Original Message -----
Sent: Friday, June 17, 2005 4:47 PM
Subject: [Mingw-users] question about gcc's __builtin_return

I need to 'forward function call' for a language binding I'm writting (ObjectiveC-.NET)
I have a problem with _builtin_return which is reproduced in the simple attached sample.
 
While it works well with integeter, char, type of register size or less, I have problem with bigger values, such as float, double, struct.....
 
anyone could shed some light?
Reply | Threaded
Open this post in threaded view
|

Re: question about gcc's __builtin_return

Danny Smith
In reply to this post by Lloyd Dupont-2

----- Original Message -----
From: "Lloyd Dupont"

>I need to 'forward function call' for a language binding I'm writting
(ObjectiveC-.NET)
>I have a problem with _builtin_return which is reproduced in the simple
attached sample.

Please provide a testcase thar can be reproduced with GNU toolset.

>While it works well with integeter, char, type of register size or less, I have
problem with bigger values, such >as float, double, struct.....

> anyone could shed some light?


This is a WAG, but try compiling your C code with -mno-accumulate-outgoing-args.
Danny




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: question about gcc's __builtin_return

Jeremy Bettis
In reply to this post by Lloyd Dupont-2
GNUStep's gnustep-base library uses libffcall instead of __builtin_return to do forwarding a nd it seems to work just fine.
 
And what is this ObjectiveC-.NET you are working on?  (Perhaps private email on that last one would be more appropriate.)
----- Original Message -----
Sent: Friday, June 17, 2005 1:47 AM
Subject: [Mingw-users] question about gcc's __builtin_return

I need to 'forward function call' for a language binding I'm writting (ObjectiveC-.NET)
I have a problem with _builtin_return which is reproduced in the simple attached sample.
 
While it works well with integeter, char, type of register size or less, I have problem with bigger values, such as float, double, struct.....
 
anyone could shed some light?