Author: tkreuzer Date: Tue Dec 16 19:16:58 2008 New Revision: 38133
URL: http://svn.reactos.org/svn/reactos?rev=38133&view=rev Log: - Add asm stubs for atan2, exp, fmod, ldexp, log10 - hack in _time64 and _localtime64
Added: branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/atan2.S (with props) branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/exp.S (with props) branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/fmod.S (with props) branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/ldexp.S (with props) branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/log10.S (with props) Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/crt.rbuild branches/ros-amd64-bringup/reactos/lib/sdk/crt/libcntpr.rbuild branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/ctime.c branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/time.c
Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/crt.rbuild URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/sd... ============================================================================== --- branches/ros-amd64-bringup/reactos/lib/sdk/crt/crt.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/crt.rbuild [iso-8859-1] Tue Dec 16 19:16:58 2008 @@ -161,11 +161,23 @@ </directory> </if> <if property="ARCH" value="amd64"> - <directory name="i386"> - <file>atan2.c</file> - <file>exp.c</file> - <file>fmod.c</file> - <file>ldexp.c</file> + <directory name="amd64"> + <file>alldiv.S</file> + <file>atan.S</file> + <file>atan2.S</file> + <file>ceil.S</file> + <file>cos.S</file> + <file>exp.S</file> + <file>fabs.S</file> + <file>floor.S</file> + <file>fmod.S</file> + <file>ldexp.S</file> + <file>log.S</file> + <file>log10.S</file> + <file>pow.S</file> + <file>sin.S</file> + <file>sqrt.S</file> + <file>tan.S</file> </directory> </if> <ifnot property="ARCH" value="i386">
Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/libcntpr.rbuild URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/sd... ============================================================================== --- branches/ros-amd64-bringup/reactos/lib/sdk/crt/libcntpr.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/libcntpr.rbuild [iso-8859-1] Tue Dec 16 19:16:58 2008 @@ -64,11 +64,16 @@ <directory name="amd64"> <file>alldiv.S</file> <file>atan.S</file> + <file>atan2.S</file> <file>ceil.S</file> <file>cos.S</file> + <file>exp.S</file> <file>fabs.S</file> <file>floor.S</file> + <file>fmod.S</file> + <file>ldexp.S</file> <file>log.S</file> + <file>log10.S</file> <file>pow.S</file> <file>sin.S</file> <file>sqrt.S</file>
Added: branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/atan2.S URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/sd... ============================================================================== --- branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/atan2.S (added) +++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/atan2.S [iso-8859-1] Tue Dec 16 19:16:58 2008 @@ -1,0 +1,21 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of atan2 + * FILE: lib/sdk/crt/math/amd64/atan2.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <ndk/amd64/asm.h> +#include <ndk/amd64/asmmacro.S> + +.intel_syntax noprefix + + +.proc atan2 + UNIMPLEMENTED atan2 + ret + +.endproc
Propchange: branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/atan2.S ------------------------------------------------------------------------------ svn:eol-style = native
Added: branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/exp.S URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/sd... ============================================================================== --- branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/exp.S (added) +++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/exp.S [iso-8859-1] Tue Dec 16 19:16:58 2008 @@ -1,0 +1,21 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of exp + * FILE: lib/sdk/crt/math/amd64/exp.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <ndk/amd64/asm.h> +#include <ndk/amd64/asmmacro.S> + +.intel_syntax noprefix + + +.proc exp + UNIMPLEMENTED exp + ret + +.endproc
Propchange: branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/exp.S ------------------------------------------------------------------------------ svn:eol-style = native
Added: branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/fmod.S URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/sd... ============================================================================== --- branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/fmod.S (added) +++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/fmod.S [iso-8859-1] Tue Dec 16 19:16:58 2008 @@ -1,0 +1,21 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of fmod + * FILE: lib/sdk/crt/math/amd64/fmod.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <ndk/amd64/asm.h> +#include <ndk/amd64/asmmacro.S> + +.intel_syntax noprefix + + +.proc fmod + UNIMPLEMENTED fmod + ret + +.endproc
Propchange: branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/fmod.S ------------------------------------------------------------------------------ svn:eol-style = native
Added: branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/ldexp.S URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/sd... ============================================================================== --- branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/ldexp.S (added) +++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/ldexp.S [iso-8859-1] Tue Dec 16 19:16:58 2008 @@ -1,0 +1,21 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of ldexp + * FILE: lib/sdk/crt/math/amd64/ldexp.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <ndk/amd64/asm.h> +#include <ndk/amd64/asmmacro.S> + +.intel_syntax noprefix + + +.proc ldexp + UNIMPLEMENTED ldexp + ret + +.endproc
Propchange: branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/ldexp.S ------------------------------------------------------------------------------ svn:eol-style = native
Added: branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/log10.S URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/sd... ============================================================================== --- branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/log10.S (added) +++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/log10.S [iso-8859-1] Tue Dec 16 19:16:58 2008 @@ -1,0 +1,21 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of log10 + * FILE: lib/sdk/crt/math/amd64/log10.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <ndk/amd64/asm.h> +#include <ndk/amd64/asmmacro.S> + +.intel_syntax noprefix + + +.proc log10 + UNIMPLEMENTED log10 + ret + +.endproc
Propchange: branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/amd64/log10.S ------------------------------------------------------------------------------ svn:eol-style = native
Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/ctime.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/sd... ============================================================================== --- branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/ctime.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/ctime.c [iso-8859-1] Tue Dec 16 19:16:58 2008 @@ -1031,6 +1031,15 @@ return &tm; }
+struct tm * +_localtime64(const __time64_t * CPP_CONST timep) +{ + static struct tm tm; + + localsub(timep, 0L, &tm); + return &tm; +} + /* ** gmtsub is to gmtime as localsub is to localtime. */
Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/time.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/sd... ============================================================================== --- branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/time.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/time.c [iso-8859-1] Tue Dec 16 19:16:58 2008 @@ -26,6 +26,18 @@ FILETIME SystemTime; DWORD Remainder; time_t tt; + GetSystemTimeAsFileTime(&SystemTime); + tt = FileTimeToUnixTime(&SystemTime,&Remainder); + if (t) + *t = tt; + return tt; +} + +__time64_t _time64(__time64_t* t) +{ + FILETIME SystemTime; + DWORD Remainder; + __time64_t tt; GetSystemTimeAsFileTime(&SystemTime); tt = FileTimeToUnixTime(&SystemTime,&Remainder); if (t)