Version: WinAVR-20081205
Target: -mmcu=atmega32
#include
uint8_t foo()
{
uint8_t val = 0;
if (bit_is_set(PINA,PA5)) val |=1;
if (bit_is_set(PINA,PA0)) val |=2;
return val;
}
I would expect something like that:
foo:
clr r24
sbic 0x19,5
ori r24,1
sbic 0x19,0
ori r24,2
ret
Compiling with -Os -mmcu=atmega32
00000000 :
0: 89...
2009-02-20 01:24:03 UTC in WinAVR