This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
inlines not as good as macros?
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: inlines not as good as macros?
- From: Jeff Garzik <jgarzik at pobox dot com>
- Date: Tue, 29 Jun 1999 09:11:43 -0400
- Organization: none
Platform: alpha-unknown-linux-gnu
Version: gcc version gcc-2.96 19990625 (experimental)
When compiling the Linux kernel v2.2.10 on Alpha, there are some inline
functions in linux/include/asm-alpha/smplock.h. Changing these inlines
to macros appears to make the output assembly slightly smaller, and a
few instructions are different.
I tried this experiment because Alan Cox indicated that gcc macros are
still slightly better than inlines for some cases.
To reproduce, download kernel 2.2.10, apply the
include/asm-alpha/smplock.h patch, and diff the assembler output of some
C file (I picked kernel/fork.c).
Bug?
Regards,
Jeff