[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bug #31768] Difference in address between using a direct
From: |
Joerg Wunsch |
Subject: |
[avr-libc-dev] [bug #31768] Difference in address between using a direct var or through a struct |
Date: |
Thu, 25 Nov 2010 22:24:01 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.12) Gecko/20100914 Firefox/3.5.12 |
Update of bug #31768 (project avr-libc):
Status: None => Works For Me
Assigned to: None => aboyapati
_______________________________________________________
Follow-up Comment #1:
To me, it seems this has been fixed in recent versions of
the library. If I compile the following C code:
#include <avr/io.h>
void foo(void)
{
ADCA.CH0.MUXCTRL = ADC_CH_MUXPOS_PIN0_gc;
ADCA_CH0_MUXCTRL = ADC_CH_MUXPOS_PIN0_gc;
}
into assembly for an ATxmega64D3, I get the following
assembler code:
foo:
/* prologue: function */
/* frame size = 0 */
ldi r30,lo8(512)
ldi r31,hi8(512)
std Z+33,__zero_reg__
sts 545,__zero_reg__
/* epilogue start */
ret
As 512+33 = 545, both operations perform the same thing.
The difference in your posting is 6 bytes, which could
perhaps be accounted to a malfunctioning implementation
of the macro _WORDREGISTER in your library version.
Perhaps you could just try it with a current header file?
I pass it on to Anitha for a final (and independent from my
opinion) decision.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?31768>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/