that's true - __builtin_frame_address() may vary upon real r1/r4 value. There are some new builtins impolemented in 3.4 and which will fix this problem. So, just downgrade to 3.2 (3.3 really isn' any better) .
~d On Friday 05 September 2003 01:59, Hunter Ware wrote: > long time lurker, first time caller. *grin* > > I've been using a version of mspgcc and gcc-3.2.3 with a 6+ month old > msplibc for a while now and decided to upgrade. A side question for the > group is: is it unwise to move to gcc-3.3.1 with mspgcc? (I like the > move as it's the same version we use for host and arm development). > > In gcc-3.3.1 __FUNCTION__ functionality has been changed to more > closely match C99 specs. This means that iomacros.h:BIC_SR_IRQ no > longer compiles without a warning about deprecated string concat of > __FUNCTION__. I decided to try and fix this for us and ran into a > problem with __builtin_frame_address. > > I think the proper way to do _BIC_SR_IRQ is: > > #define _BIC_SR_IRQ(x)\ > {\ > void* addr = __builtin_frame_address(0); > __asm__ __volatile__ (\ > "bic %0, %1 : : "i" ((uint16_t)x), "o" ((uint16_t)addr)\ > )\ > } > > the problem is that __builtin_frame_address does not return the start of > frame, it instead just returns the current stack pointer. I tried to > figure out where this is broken but got pretty lost in builtins.c and > couldn't really get anywhere. Any ideas? > > Thanks, > Hunter > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users -- /***************************************************************** ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) State Polytechnical Univ. (_Y_.)' ._ ) `._ `. ``-..-' Radio-Physics Departament _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 5403923, 5585314 *****************************************************************/