Author: fireball Date: Sat Aug 16 03:15:49 2008 New Revision: 35368
URL: http://svn.reactos.org/svn/reactos?rev=35368&view=rev Log: - Move x86-specific code, which was accidentally committed to the generic part of crt library to arch specific area. - Include x86-specific _CI* functions into libcntpr.
Added: trunk/reactos/lib/sdk/crt/math/i386/ci.c (contents, props changed) - copied, changed from r35357, trunk/reactos/lib/sdk/crt/math/stubs.c Modified: trunk/reactos/lib/sdk/crt/crt.rbuild trunk/reactos/lib/sdk/crt/libcntpr.rbuild trunk/reactos/lib/sdk/crt/math/stubs.c
Modified: trunk/reactos/lib/sdk/crt/crt.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.rbuild?rev=... ============================================================================== --- trunk/reactos/lib/sdk/crt/crt.rbuild [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/crt.rbuild [iso-8859-1] Sat Aug 16 03:15:49 2008 @@ -104,6 +104,7 @@ <if property="ARCH" value="i386"> <directory name="i386"> <file>atan2.c</file> + <file>ci.c</file> <file>exp.c</file> <file>fmod.c</file> <file>ldexp.c</file>
Modified: trunk/reactos/lib/sdk/crt/libcntpr.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/libcntpr.rbuild... ============================================================================== --- trunk/reactos/lib/sdk/crt/libcntpr.rbuild [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/libcntpr.rbuild [iso-8859-1] Sat Aug 16 03:15:49 2008 @@ -41,6 +41,7 @@ <file>aulldvrm_asm.s</file> <file>aullrem_asm.s</file> <file>aullshr_asm.s</file> + <file>ci.c</file> <file>ceil_asm.s</file> <file>cos_asm.s</file> <file>fabs_asm.s</file>
Copied: trunk/reactos/lib/sdk/crt/math/i386/ci.c (from r35357, trunk/reactos/lib/sdk/crt/math/stubs.c) URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/i386/ci.c?... ============================================================================== --- trunk/reactos/lib/sdk/crt/math/stubs.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/i386/ci.c [iso-8859-1] Sat Aug 16 03:15:49 2008 @@ -135,90 +135,3 @@ FPU_DOUBLES(x, y); return fmod(x, y); } - -/* The following functions are likely workarounds for the pentium fdiv bug */ -void __stdcall _adj_fdiv_m32( unsigned int arg ) -{ - FIXME("_adj_fdiv_m32 stub\n"); -} -void __stdcall _adj_fdiv_m32i( int arg ) -{ - FIXME("_adj_fdiv_m32i stub\n"); -} - -void __stdcall _adj_fdiv_m64( unsigned __int64 arg ) -{ - FIXME("_adj_fdiv_m64 stub\n"); -} - -void _adj_fdiv_r(void) -{ - FIXME("_adj_fdiv_r stub\n"); -} - -void __stdcall _adj_fdivr_m32( unsigned int arg ) -{ - FIXME("_adj_fdivr_m32i stub\n"); -} - -void __stdcall _adj_fdivr_m32i( int arg ) -{ - FIXME("_adj_fdivr_m32i stub\n"); -} - -void __stdcall _adj_fdivr_m64( unsigned __int64 arg ) -{ - FIXME("_adj_fdivr_m64 stub\n"); -} - -void _adj_fpatan(void) -{ - FIXME("_adj_fpatan stub\n"); -} - -void __stdcall _adj_fdiv_m16i( short arg ) -{ - FIXME("_adj_fdiv_m16i stub\n"); -} - -void __stdcall _adj_fdivr_m16i( short arg ) -{ - FIXME("_adj_fdivr_m16i stub\n"); -} - -void _adj_fprem(void) -{ - FIXME("_adj_fprem stub\n"); -} - -void _adj_fprem1(void) -{ - FIXME("_adj_fprem1 stub\n"); -} - -void _adj_fptan(void) -{ - FIXME("_adj_fptan stub\n"); -} - -void _safe_fdiv(void) -{ - FIXME("_safe_fdiv stub\n"); -} - -void _safe_fdivr(void) -{ - FIXME("_safe_fdivr stub\n"); -} - -void _safe_fprem(void) -{ - FIXME("_safe_fprem stub\n"); -} - -void _safe_fprem1(void) -{ - FIXME("_safe_fprem1 stub\n"); -} - -
Propchange: trunk/reactos/lib/sdk/crt/math/i386/ci.c ------------------------------------------------------------------------------ svn:eol-style = native
Propchange: trunk/reactos/lib/sdk/crt/math/i386/ci.c ------------------------------------------------------------------------------ svn:keywords = author date id revision
Propchange: trunk/reactos/lib/sdk/crt/math/i386/ci.c ------------------------------------------------------------------------------ svn:mergeinfo =
Modified: trunk/reactos/lib/sdk/crt/math/stubs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/stubs.c?re... ============================================================================== --- trunk/reactos/lib/sdk/crt/math/stubs.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/stubs.c [iso-8859-1] Sat Aug 16 03:15:49 2008 @@ -1,138 +1,134 @@ #include <precomp.h> #include <math.h>
-#define FPU_DOUBLE(var) double var; \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : ) -#define FPU_DOUBLES(var1,var2) double var1,var2; \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : ) - -/* - * @implemented - */ -double CDECL _CIsin(void) -{ - FPU_DOUBLE(x); +double CDECL _CIsin(double x); +double CDECL _CIcos(double x); +double CDECL _CItan(double x); +double CDECL _CIsinh(double x); +double CDECL _CIcosh(double x); +double CDECL _CItanh(double x); +double CDECL _CIasin(double x); +double CDECL _CIacos(double x); +double CDECL _CIatan(double x); +double CDECL _CIatan2(double y, double x); +double CDECL _CIexp(double x); +double CDECL _CIlog(double x); +double CDECL _CIlog10(double x); +double CDECL _CIpow(double x, double y); +double CDECL _CIsqrt(double x); +double CDECL _CIfmod(double x, double y); + + +/* + * @implemented + */ +double CDECL _CIsin(double x) +{ return sin(x); } /* * @implemented */ -double CDECL _CIcos(void) -{ - FPU_DOUBLE(x); +double CDECL _CIcos(double x) +{ return cos(x); } /* * @implemented */ -double CDECL _CItan(void) -{ - FPU_DOUBLE(x); +double CDECL _CItan(double x) +{ return tan(x); } /* * @implemented */ -double CDECL _CIsinh(void) -{ - FPU_DOUBLE(x); +double CDECL _CIsinh(double x) +{ return sinh(x); } /* * @implemented */ -double CDECL _CIcosh(void) -{ - FPU_DOUBLE(x); +double CDECL _CIcosh(double x) +{ return cosh(x); } /* * @implemented */ -double CDECL _CItanh(void) -{ - FPU_DOUBLE(x); +double CDECL _CItanh(double x) +{ return tanh(x); } /* * @implemented */ -double CDECL _CIasin(void) -{ - FPU_DOUBLE(x); +double CDECL _CIasin(double x) +{ return asin(x); } /* * @implemented */ -double CDECL _CIacos(void) -{ - FPU_DOUBLE(x); +double CDECL _CIacos(double x) +{ return acos(x); } /* * @implemented */ -double CDECL _CIatan(void) -{ - FPU_DOUBLE(x); +double CDECL _CIatan(double x) +{ return atan(x); } /* * @implemented */ -double CDECL _CIatan2(void) -{ - FPU_DOUBLES(x, y); - return atan2(x, y); -} -/* - * @implemented - */ -double CDECL _CIexp(void) -{ - FPU_DOUBLE(x); +double CDECL _CIatan2(double x, double y) +{ + return atan2(y, x); +} +/* + * @implemented + */ +double CDECL _CIexp(double x) +{ return exp(x); } /* * @implemented */ -double CDECL _CIlog(void) -{ - FPU_DOUBLE(x); +double CDECL _CIlog(double x) +{ return log(x); } /* * @implemented */ -double CDECL _CIlog10(void) -{ - FPU_DOUBLE(x); +double CDECL _CIlog10(double x) +{ return log10(x); } /* * @implemented */ -double CDECL _CIpow(void) -{ - FPU_DOUBLES(x, y); +double CDECL _CIpow(double x, double y) +{ return pow(x, y); } /* * @implemented */ -double CDECL _CIsqrt(void) -{ - FPU_DOUBLE(x); +double CDECL _CIsqrt(double x) +{ return sqrt(x); } /* * @implemented */ -double CDECL _CIfmod(void) -{ - FPU_DOUBLES(x, y); +double CDECL _CIfmod(double x, double y) +{ return fmod(x, y); }