This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

inlines not as good as macros?



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]