From: Andreas Schwab Date: Wed, 26 Oct 2011 09:34:30 +0000 (+0200) Subject: m68k: add optimized math_opt_barrier and math_force_eval X-Git-Tag: glibc-2.16-ports-before-merge~344 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=290c9bd53bd0e4e7ae66fbc1c33d8a0e87e5f829;p=thirdparty%2Fglibc.git m68k: add optimized math_opt_barrier and math_force_eval --- diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 7b2688eed7f..09de15987b0 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,7 @@ 2011-10-26 Andreas Schwab + * sysdeps/m68k/m680x0/fpu/math_private.h: New file. + * sysdeps/m68k/m680x0/fpu/sincostab.c: New file. 2011-10-23 Andreas Schwab diff --git a/sysdeps/m68k/m680x0/fpu/math_private.h b/sysdeps/m68k/m680x0/fpu/math_private.h new file mode 100644 index 00000000000..3793cff2034 --- /dev/null +++ b/sysdeps/m68k/m680x0/fpu/math_private.h @@ -0,0 +1,19 @@ +#ifndef _MATH_PRIVATE_H + +#define math_opt_barrier(x) \ +({ __typeof (x) __x; \ + __asm ("" : "=f" (__x) : "0" (x)); \ + __x; }) +#define math_force_eval(x) \ +do \ + { \ + __typeof (x) __x = (x); \ + if (sizeof (x) <= sizeof (double)) \ + __asm __volatile ("" : : "m" (__x)); \ + else \ + __asm __volatile ("" : : "f" (__x)); \ + } \ +while (0) + +#include +#endif