[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] possible compiler bug?
From: |
Brian Dean |
Subject: |
Re: [avr-gcc-list] possible compiler bug? |
Date: |
Wed, 28 Aug 2002 21:25:17 -0400 |
User-agent: |
Mutt/1.4i |
On Wed, Aug 28, 2002 at 05:55:28PM -0700, Theodore A. Roth wrote:
>
> I've yet to see a case where the compiler didn't do the high byte first
> for a 16bit register access. I could be wrong though.
In the message you replied to, see the set_pwm() function:
void set_pwm(volatile uint16_t * pwmreg, uint16_t pwm)
{
*pwmreg = pwm;
}
Results in:
set_pwm:
movw r30,r24
st Z,r22
std Z+1,r23
ret
Low byte first, followed by high byte.
-Brian
avr-gcc-list at http://avr1.org
- [avr-gcc-list] possible compiler bug?, Brian Dean, 2002/08/31
- Re: [avr-gcc-list] possible compiler bug?, Theodore A. Roth, 2002/08/31
- Re: [avr-gcc-list] possible compiler bug?, Brian Dean, 2002/08/31
- Re: [avr-gcc-list] possible compiler bug?, Theodore A. Roth, 2002/08/31
- Re: [avr-gcc-list] possible compiler bug?,
Brian Dean <=
- Re: [avr-gcc-list] possible compiler bug?, Theodore A. Roth, 2002/08/31
- Re: [avr-gcc-list] possible compiler bug?, Brian Dean, 2002/08/31
- Re: [avr-gcc-list] possible compiler bug?, Joerg Wunsch, 2002/08/31
- Re: [avr-gcc-list] possible compiler bug?, Brian Dean, 2002/08/31