[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Problem with the calling convention
From: |
Martin Krüger |
Subject: |
[avr-gcc-list] Problem with the calling convention |
Date: |
Wed, 14 Jul 2004 10:49:13 GMT |
Hello everybody
I am developing an application for an avr device by first compiling ist as an
linux executable,
then if everything ist fine so far compiling it for the avr.
I noticed a bug in my application which only existst on the avr,but not in the
linux executable.
So i thought this could be a problem with the compiler.
I looked in the assembler files,now i can exactly describe the problem.
I wrote a funtion with this arguments:
(arg1 16bit,arg2 8bit,arg3 8bit,arg4 32bit)
The following calling-convention ist used:
arg1 r25,r24 (r25 MSB)
arg2 r22
arg3 r20
arg4 r19-r16 (r19 MSB)
The problem ist another function called using r19,r18 without pushing
and restoring its values.
I used this workaround:
*compiling with -S (stop before assembling)
*adding the required push and pop mnemonics
*assembling
I am using avr-gcc version 3.4.0
Any suggestions?
Martin Kruger
__________________________________________________________________
Digitalkameras - Aktuelle Angebote unter EUR 90,- www.ebay.de!!
Über 1 Mio. Angebote zu günstigen Preisen! eBay - Jetzt besser kaufen!
- [avr-gcc-list] Problem with the calling convention,
Martin Krüger <=