|
From: | E. Weddington |
Subject: | Re: [avr-libc-dev] RFC: avr/bits.h |
Date: | Tue, 01 Mar 2005 11:24:18 -0700 |
User-agent: | Mozilla Thunderbird 0.7.3 (Windows/20040803) |
Bob Paddock wrote:
On Tue, 01 Mar 2005 10:00:13 -0700, E. Weddington <address@hidden> wrote:Bob Paddock wrote:I wanted to do a test caseDoing the test case right in the first place always help. You can not us a BIT() inside of a bit_set(). :-(
It depends on how bit_set() is defined. ;-) I was going under a false assumption about how they were defined.I personally do not support the macros as written by Erik Walthinsen (sorry, Erik).
<test> All of the code lookes reasonable now that I don't have recursive macros, even got the proper sbi for PORTD. 34 foo: 35 .LFB2: 36 .LM1: 37 /* prologue: frame size=0 */ 38 /* prologue end (size=0) */ 39 .LM2: 40 0000 939A sbi 50-0x20,3 41 /* epilogue: frame size=0 */
That's good!
Well it won't "promote" to 32 bits as it's there already. The other macros that I defined will then trim that value down to the specified length (8/16 bits).Is there some case where the construct ((uint32_t)1<<(bitpos)) is really going to promote to 32 bit code?
Eric
[Prev in Thread] | Current Thread | [Next in Thread] |