Changing register for passing return value from function call
joel@OARcorp.com
joel@OARcorp.com
Mon Feb 8 18:45:00 GMT 1999
On Mon, 8 Feb 1999, Arjan Koers wrote:
> On Mon, 8 Feb 1999 07:13:48 -0600 (CST), joel@OARcorp.com wrote:
>
> >On Thu, 4 Feb 1999, Arjan Koers wrote:
> >
> >> Some compiler directive to use %a0 that can be placed at the function
> >> delaration and at the function calls would be nice.
> >
> >IMO it would be much easier to write a small assembly function that moved
> >the value returned from a0 to d0 than to fiddle with gcc.
>
> Yes, that's the way I've implemented it at the moment. However,
> because I'm not the only one that's going to use GCC this way, I would
> prefer a method that's without assembly.
If this can be hidden in a run-time support library that is automatically
linked in, then it is still not a big deal to write it in assembly. In
this case, you are tinkering with the specs file for your target which I
personally think is easier that changing the code generation.
But if there are lots of system libraries that follow this convention (you
have only mentioned a few routines), then I guess you are stuck.
--joel
Joel Sherrill Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
_______________________________________________
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