From 7e308604ee0aa67bc37f37d6f69ed41481c427a0 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 31 Oct 2010 03:03:38 +0100 Subject: libm: improve readability of math.h; expand comments and docs Signed-off-by: Denys Vlasenko --- libc/sysdeps/linux/alpha/bits/mathdef.h | 8 ++++---- libc/sysdeps/linux/common/bits/mathcalls.h | 13 +++++++++---- libc/sysdeps/linux/i386/bits/mathinline.h | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) (limited to 'libc/sysdeps/linux') diff --git a/libc/sysdeps/linux/alpha/bits/mathdef.h b/libc/sysdeps/linux/alpha/bits/mathdef.h index 2e5258230..615eb9db6 100644 --- a/libc/sysdeps/linux/alpha/bits/mathdef.h +++ b/libc/sysdeps/linux/alpha/bits/mathdef.h @@ -44,12 +44,12 @@ typedef double double_t; /* Due to an ABI change, we need to remap the complex float symbols. */ # define _Mdouble_ float # define __MATHCALL(function, args) \ - __MATHDECL (_Complex float, function, args) + __MATHDECL(_Complex float, function, args) # define __MATHDECL(type, function, args) \ - __MATHDECL_1(type, function##f, args, __c1_##function##f); \ - __MATHDECL_1(type, __##function##f, args, __c1_##function##f) + __MATHDECL_1(type, function##f, args, __c1_##function##f); \ + __MATHDECL_1(type, __##function##f, args, __c1_##function##f) # define __MATHDECL_1(type, function, args, alias) \ - extern type function args __asm__(#alias) __THROW + extern type function args __asm__(#alias) __THROW # include diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h index 3772b7d0d..1e92b527e 100644 --- a/libc/sysdeps/linux/common/bits/mathcalls.h +++ b/libc/sysdeps/linux/common/bits/mathcalls.h @@ -48,11 +48,16 @@ #endif -/* __MATHCALLX and __MATHCALLI include libm_hidden_def +/* __MATHCALLX(type,function,[suffix],args,attrib) and + * __MATHCALLI(type,function,[suffix],args) include libm_hidden_def * (for "double" versions only, xxxf and xxxl do not get this treatment). - * __MATHCALL does not. - * __MATHDECL_PRIV includes libm_hidden_def (always) - * and declares __foo, not foo. + * + * __MATHDECL(type,function,[suffix],args) does not. + * __MATHCALL(function,[suffix],args) also does not + * (it is just a shortcut to __MATHDECL(_Mdouble_,function,[suffix],args)). + * + * __MATHDECL_PRIV(type,function,[suffix],args,attrib) + * includes libm_hidden_def (always) and declares __foo, not foo. */ diff --git a/libc/sysdeps/linux/i386/bits/mathinline.h b/libc/sysdeps/linux/i386/bits/mathinline.h index 53cbcb2b3..9e67182d5 100644 --- a/libc/sysdeps/linux/i386/bits/mathinline.h +++ b/libc/sysdeps/linux/i386/bits/mathinline.h @@ -206,7 +206,7 @@ __NTH (__signbitl (long double __x)) __MATH_INLINE float_type __NTH (func (float_type __x)) \ { \ register float_type __result; \ - __asm__ __volatile__ (op : "=t" (__result) : params); \ + __asm__ __volatile__ (op : "=t" (__result) : params); \ return __result; \ } -- cgit v1.2.3