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

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

Re: Antworten: Re: [avr-gcc-list] Problem with the calling convention


From: Joerg Wunsch
Subject: Re: Antworten: Re: [avr-gcc-list] Problem with the calling convention
Date: Wed, 14 Jul 2004 18:06:57 +0200 (MET DST)

"Martin Krüger " <address@hidden> wrote:

> avr-gcc -c -Os  test.c (without optimization the code seems to be ok)
> 
> avr-objdump -D test.o

You could have called avr-gcc with -S directly instead. ;-)

> The we will see the call to testfunc32
> 
> mov     r25, r19
> mov     r24, r18
> mov     r23, r17
> mov     r22, r16
> rcall   .+0

That's quite OK.

> This code is executed after all the other function-calls.
> Any of these could have modified the values of  r19,r18

Sure, but since they are not used again afterwards, this is not a
problem.

However, I can see a problem.  If I add something like

unsigned long foo;

....

testfunc(...)
{
 ...
 foo = d;
}

it still doesn't save r18/r19.  In that case, I think it /is/ a bug.

Please submit a GCC bug report for this (but use my addition, since it
makes the bug obvious).

-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/


reply via email to

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