- Add asm stubs for atan2, exp, fmod, ldexp, log10
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 17 Dec 2008 01:16:58 +0000 (01:16 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 17 Dec 2008 01:16:58 +0000 (01:16 +0000)
- hack in _time64 and _localtime64

svn path=/branches/ros-amd64-bringup/; revision=38133

reactos/lib/sdk/crt/crt.rbuild
reactos/lib/sdk/crt/libcntpr.rbuild
reactos/lib/sdk/crt/math/amd64/atan2.S [new file with mode: 0644]
reactos/lib/sdk/crt/math/amd64/exp.S [new file with mode: 0644]
reactos/lib/sdk/crt/math/amd64/fmod.S [new file with mode: 0644]
reactos/lib/sdk/crt/math/amd64/ldexp.S [new file with mode: 0644]
reactos/lib/sdk/crt/math/amd64/log10.S [new file with mode: 0644]
reactos/lib/sdk/crt/time/ctime.c
reactos/lib/sdk/crt/time/time.c

index b39c50c..1d81724 100644 (file)
                        </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">
index a260919..c92321f 100644 (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>
diff --git a/reactos/lib/sdk/crt/math/amd64/atan2.S b/reactos/lib/sdk/crt/math/amd64/atan2.S
new file mode 100644 (file)
index 0000000..15ac4b8
--- /dev/null
@@ -0,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
diff --git a/reactos/lib/sdk/crt/math/amd64/exp.S b/reactos/lib/sdk/crt/math/amd64/exp.S
new file mode 100644 (file)
index 0000000..bd4a8d0
--- /dev/null
@@ -0,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
diff --git a/reactos/lib/sdk/crt/math/amd64/fmod.S b/reactos/lib/sdk/crt/math/amd64/fmod.S
new file mode 100644 (file)
index 0000000..1ad26d9
--- /dev/null
@@ -0,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
diff --git a/reactos/lib/sdk/crt/math/amd64/ldexp.S b/reactos/lib/sdk/crt/math/amd64/ldexp.S
new file mode 100644 (file)
index 0000000..9d4649c
--- /dev/null
@@ -0,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
diff --git a/reactos/lib/sdk/crt/math/amd64/log10.S b/reactos/lib/sdk/crt/math/amd64/log10.S
new file mode 100644 (file)
index 0000000..1f9c77a
--- /dev/null
@@ -0,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
index fd7eda2..664143b 100644 (file)
@@ -1031,6 +1031,15 @@ localtime(const time_t * CPP_CONST timep)
   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.
 */
index 93d9ee1..eac94d6 100644 (file)
@@ -33,6 +33,18 @@ time_t time(time_t* t)
        return tt;
 }
 
+__time64_t _time64(__time64_t* t)
+{
+       FILETIME  SystemTime;
+       DWORD Remainder;
+       __time64_t tt;
+       GetSystemTimeAsFileTime(&SystemTime);
+       tt = FileTimeToUnixTime(&SystemTime,&Remainder);
+       if (t)
+               *t = tt;
+       return tt;
+}
+
 /***********************************************************************
  *           DOSFS_UnixTimeToFileTime
  *