Hi. > >> New ATtiny devices also have LPM Rx, Z+ instruction. When I added >> avr25 architecture in GCC, I have introduced two gcc macros >> __AVR_HAVE_MOVW__ and __AVR_HAVE_LPMX__. Now I have added >> __AVR_HAVE_MUL__ macro in GCC for avr4 and avr5 architectures. > > Does that mean __AVR_ENHANCED__ will eventually become obsolete then?
I consider that the __AVR_ENHANCED__ macro should be obsolete. I asked Denis the sanction to remove __AVR_ENHANCED__ from the GCC 4.3 or later version, but he was against. Hence the __AVR_ENHANCED__ will be present in the compiler still some time. > > How are the different compiler and library versions playing together? > Say, we have an older compiler that doesn't know anything about the > new macros but only sets __AVR_ENHANCED__, will the library code then > assume all of __AVR_HAVE_MOVW__, __AVR_HAVE_LPMX__, and > __AVR_HAVE_MUL__? > __AVR_HAVE_*__ macros are defined in 'include/avr/io.h' and 'common/macros.inc' files so: #ifndef __AVR_HAVE_MOVW__ # if defined(__AVR_ENHANCED__) && __AVR_ENHANCED__ # define __AVR_HAVE_MOVW__ 1 # endif #endif If compiler knows only __AVR_ENHANCED__ macro, __AVR_HAVE_*__ macros are defined when defined __AVR_ENHANCED__ (i.e. for avr4 and avr5). Anatoly. _______________________________________________ AVR-libc-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-libc-dev
