I tried using this typedef, below, as a parameter to a function. When I do, it gets stuck onto the stack frame. The resulting code is a riot since there is all sorts of set up and teardown, the value gets stuck onto the stack, the routine called, the variable pulled off the stack into registers where it is acted upon.
Taking out the bitfield reverts to more normal GCC behavior: the union is passed in a dword register set. An aside from some shuffling of registers is pretty decent code. Gcc 3.4.3 (latest WinAvr). Is this a known issue? Typedef union { Uint32_t dword; Uint16_t word[2]; Uint8_t byte[4]; Struct { Uint16_t offset:7; Uint16_t page:10; Uint16_t bank:2; } bits; } Addr_u; ---- Larry Barello www.barello.net _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list