diff options
author | Denis Vlasenko | 2008-06-27 03:55:18 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-06-27 03:55:18 +0000 |
commit | 42b8daf88a600289d6b72c52777183ef64b05bb0 (patch) | |
tree | 7a213fa6c8779f28f8befa6257c3fa9b0f960c33 /include/platform.h | |
parent | defc1ea34074e7882724c460260d307cdf981a70 (diff) | |
download | busybox-42b8daf88a600289d6b72c52777183ef64b05bb0.zip busybox-42b8daf88a600289d6b72c52777183ef64b05bb0.tar.gz |
expand comment about FAST_FUNC
Diffstat (limited to 'include/platform.h')
-rw-r--r-- | include/platform.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/platform.h b/include/platform.h index 8d6ed9a..fe68547 100644 --- a/include/platform.h +++ b/include/platform.h @@ -97,9 +97,15 @@ # endif #endif +/* FAST_FUNC is a qualifier which (possibly) makes function call faster + * and/or smaller by using modified ABI. It is usually only needed + * on non-static, busybox internal functions. Recent versions of gcc + * optimize statics automatically. FAST_FUNC on static is required + * only if you need to match a function pointer's type */ #if __GNUC_PREREQ(3,0) && defined(i386) /* || defined(__x86_64__)? */ # define FAST_FUNC __attribute__((regparm(3))) +/* #elif ... - add your favorite arch today! */ #else # define FAST_FUNC #endif @@ -145,8 +151,9 @@ /* ---- Unaligned access ------------------------------------ */ /* parameter is supposed to be an uint32_t* ptr */ -#if defined(i386) || defined(__x86_64__) /* + other arches? */ +#if defined(i386) || defined(__x86_64__) #define get_unaligned_u32p(u32p) (*(u32p)) +/* #elif ... - add your favorite arch today! */ #else /* performs reasonably well (gcc usually inlines memcpy here) */ #define get_unaligned_u32p(u32p) ({ uint32_t __t; memcpy(&__t, (u32p), 4); __t; }) |