avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] C code calling ASM functions


From: Dmitry K.
Subject: Re: [avr-gcc-list] C code calling ASM functions
Date: Wed, 30 Jan 2008 08:06:48 +1000
User-agent: KMail/1.5

On Saturday 26 January 2008 06:24, Joerg Wunsch wrote:
> Gre7g Luterman <address@hidden> wrote:
> > IIRC, it is actually the responsibility of the called
> > function (the callee) to clear r25 when returning an
> > unsigned byte.  The caller can presume this to be
> > clear already.
>
> You're right, it's a typo and should really read "callee".

An example:

  extern char Slave (void);
  int Master (void)
  {
    return Slave() + 1;
  }

Here the Master() extends char to int before addition.
This is match to common 'integral promotion'.
I have look all Avr-gcc releases since 3.3.6: anywhere
the Master() does it.

Note, in older Avr-gcc the Slave() does it also.

Regards,
Dmitry.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]