Hm... This is something new in 3.4 .... Can anybody fix this in iomacros.h ?
Cheers, ~d -----Original Message----- From: mspgcc-users-ad...@lists.sourceforge.net [mailto:mspgcc-users-ad...@lists.sourceforge.net] On Behalf Of Philip Sambles Sent: Wednesday, June 16, 2004 11:35 PM To: mspgcc-users@lists.sourceforge.net Subject: Re: [Mspgcc-users] __get_frame_address not behaving as builtin. I think I have tracked down the cause of the problem. It seems that the extern declaration of __get_frame_address (in iomacros.h) causes the compiler to assume that it really is an external call. I assume this doesn't affect the other builtins as they return void. By removing this declaration the correct code is generated, however this isn't really a fix as the return type is undefined. Regards Phil Sambles. Compiler is gcc-3.4.0 running under cygwin on Windows 2000. Command line is: msp430-gcc -S test.c The following code: #include <iomacros.h> void *func1(void) { return GET_FRAME_ADDR_F(); } produces this assembler output: func1: .L__FrameSize_func1=0x0 .L__FrameOffset_func1=0x4 push r5 push r4 call #__get_frame_address pop r4 pop r5 ret Commenting out line 126 of iomacros.h (extern void *__get_frame_address(void);) gives the following output: func1: .L__FrameSize_func1=0x0 .L__FrameOffset_func1=0x4 push r5 push r4 mov .L__FrameOffset_func1(r1), r15 pop r4 pop r5 ret Philip Sambles wrote: > Using gcc-3.4.0, calls to __get_frame_address are generating CALL > instructions (and therefore undefined symbols at link). They don't > seem to be identified as a builtin. > The other builtins (__bic_sr_irq and __bis_sr_irq) work as expected. > > Has anybody got any bright ideas as to where the problem might lie? ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users