(Please post in plain text, not html.) Inlining of normal C code is easy - you just declare the function as "inline". You can also use "static inline" functions instead of traditional #define'd macros - since they are static, the compiler knows it doesn't have to make a full non-inlined version (assuming, of course, you don't take the address of the function). Note that you need at least some optomisation turned on to enable inlining - after all, it is just a strong hint to the compiler, not a command.
I don't think it is possible to inline a C function within an assembly function. Can you split the assembly into two seperate parts, "returning" to C in the middle? mvh., David ----- Original Message ----- From: Peter Mueller To: mspgcc-users@lists.sourceforge.net Sent: Wednesday, November 12, 2003 6:41 PM Subject: Re: [Mspgcc-users] how to force inline c code in assembler Hi, I like to extend the question. Is there a way to achieve inlining in C beside using #define? Thanks, Peter Am Mittwoch, 12.11.03 um 17:19 Uhr schrieb Tjerk Hofmeijer: Hello, I've got a small assembly function that calls a C function and I want to force mspgcc to inline that C function. How can I do that ? Thanx, Tjerk Hofmeijer