This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

Re: Changing register for passing return value from function call




On Thu, 4 Feb 1999, Arjan Koers wrote:

> 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.

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. 

--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.