Changing register for passing return value from function call
Arjan Koers
arjan@koers.demon.nl
Thu Feb 4 15:32:00 GMT 1999
Hi,
I am writing library functions for m68k cpu32 (with xgcc from
objsw.com) that can get called from the system software of an embedded
system.
GNU GCC passes all return values in %d0 (and %d1 for double). The
system software returns pointers in %a0. Is there a way to let GCC use
%a0 instead of %d0 when returning pointers?
There's just one function (normally main) that gets called by the
system.
My functions can call three system functions that return pointers
(_malloc, _calloc, _realloc).
Some compiler directive to use %a0 that can be placed at the function
delaration and at the function calls would be nice.
Thanks,
Arjan Koers.
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.
More information about the crossgcc
mailing list