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

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

Re: [avr-gcc-list] Using X and Z register in global variables


From: User Tomdean
Subject: Re: [avr-gcc-list] Using X and Z register in global variables
Date: Sun, 4 Sep 2005 06:15:02 -0700 (PDT)

>From the global definition, 

register uint8_t *HEAD asm ("r30");  /* Z */
register uint8_t *TAIL asm ("r28");  /* Y */
 
register uint8_t c asm ("r15");
register uint16_t lost_count asm("r26"); /* X */

The warning is:

adc.c:155: warning: call-clobbered register used for global register variable
adc.c:155: warning: call-clobbered register used for global register variable
adc.c:159: warning: call-clobbered register used for global register variable
adc.c:159: warning: call-clobbered register used for global register variable

This is warning about using Z and X, but, not Y.

I have a small application that I need to be fast.  I need the auto
increment.  Using avr-objdump and grep, I determined there is no
problem.

But, I could not get gcc to use Z+.  I had to use inline asm.

tomdean




reply via email to

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