Implement asm stubs for alldiv, atan, ceil, cos, fabs, floor, log, pow, sin, sqrt, tan, _chkstk, _alloca_probe to libcntpr. Now we can build ntdll.

svn path=/branches/ros-amd64-bringup/; revision=38127
This commit is contained in:
Timo Kreuzer
2008-12-16 20:46:34 +00:00
parent fd16ec3f12
commit 5fa3aa4e15
13 changed files with 283 additions and 15 deletions

View File

@@ -1,22 +1,31 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Stack checker
* FILE: lib/ntdll/rtl/i386/chkstk.s
* PROGRAMER:
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of _chkstk and _alloca_probe
* FILE: lib/sdk/crt/math/amd64/chkstk_asm.s
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
.globl _chkstk
.globl _alloca_probe
/* INCLUDES ******************************************************************/
/*
_chkstk() is called by all stack allocations of more than 4 KB. It grows the
stack in areas of 4 KB each, trying to access each area. This ensures that the
guard page for the stack is hit, and the stack growing triggered
*/
_chkstk:
_alloca_probe:
/* return */
ret
#include <ndk/amd64/asm.h>
#include <ndk/amd64/asmmacro.S>
.intel_syntax noprefix
.global _MsgUnimplemented
_MsgUnimplemented:
.asciz "WARNING: %s at %s:%d is UNIMPLEMENTED!\n"
.proc _chkstk
UNIMPLEMENTED chkstk
ret
.endproc
.proc _alloca_probe
UNIMPLEMENTED alloca_probe
ret
.endproc
/* EOF */

View File

@@ -20,6 +20,12 @@
<file>seh.s</file>
</directory>
</if>
<if property="ARCH" value="amd64">
<directory name="amd64">
<file>chkstk_asm.s</file>
<file>seh.s</file>
</directory>
</if>
<if property="ARCH" value="powerpc">
<directory name="powerpc">
<file>chkstk_asm.s</file>
@@ -54,6 +60,21 @@
<file>tan_asm.s</file>
</directory>
</if>
<if property="ARCH" value="amd64">
<directory name="amd64">
<file>alldiv.S</file>
<file>atan.S</file>
<file>ceil.S</file>
<file>cos.S</file>
<file>fabs.S</file>
<file>floor.S</file>
<file>log.S</file>
<file>pow.S</file>
<file>sin.S</file>
<file>sqrt.S</file>
<file>tan.S</file>
</directory>
</if>
<file>abs.c</file>
<file>div.c</file>
<file>labs.c</file>

View File

@@ -0,0 +1,28 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of alldiv
* FILE: lib/sdk/crt/math/amd64/alldiv.S
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
/* INCLUDES ******************************************************************/
#include <ndk/amd64/asm.h>
#include <ndk/amd64/asmmacro.S>
.intel_syntax noprefix
/* DATA *********************************************************************/
.globl __fltused
__fltused:
.long 0x9875
/* FUNCTIONS ****************************************************************/
.proc alldiv
UNIMPLEMENTED alldiv
ret
.endproc

View File

@@ -0,0 +1,21 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of atan
* FILE: lib/sdk/crt/math/amd64/atan.S
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
/* INCLUDES ******************************************************************/
#include <ndk/amd64/asm.h>
#include <ndk/amd64/asmmacro.S>
.intel_syntax noprefix
.proc atan
UNIMPLEMENTED atan
ret
.endproc

View File

@@ -0,0 +1,21 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of ceil
* FILE: lib/sdk/crt/math/amd64/ceil.S
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
/* INCLUDES ******************************************************************/
#include <ndk/amd64/asm.h>
#include <ndk/amd64/asmmacro.S>
.intel_syntax noprefix
.proc ceil
UNIMPLEMENTED ceil
ret
.endproc

View File

@@ -0,0 +1,21 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of cos
* FILE: lib/sdk/crt/math/amd64/cos.S
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
/* INCLUDES ******************************************************************/
#include <ndk/amd64/asm.h>
#include <ndk/amd64/asmmacro.S>
.intel_syntax noprefix
.proc cos
UNIMPLEMENTED cos
ret
.endproc

View File

@@ -0,0 +1,21 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of fabs
* FILE: lib/sdk/crt/math/amd64/fabs.S
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
/* INCLUDES ******************************************************************/
#include <ndk/amd64/asm.h>
#include <ndk/amd64/asmmacro.S>
.intel_syntax noprefix
.proc fabs
UNIMPLEMENTED fabs
ret
.endproc

View File

@@ -0,0 +1,21 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of floor
* FILE: lib/sdk/crt/math/amd64/floor.S
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
/* INCLUDES ******************************************************************/
#include <ndk/amd64/asm.h>
#include <ndk/amd64/asmmacro.S>
.intel_syntax noprefix
.proc floor
UNIMPLEMENTED floor
ret
.endproc

View File

@@ -0,0 +1,21 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of log
* FILE: lib/sdk/crt/math/amd64/log.S
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
/* INCLUDES ******************************************************************/
#include <ndk/amd64/asm.h>
#include <ndk/amd64/asmmacro.S>
.intel_syntax noprefix
.proc log
UNIMPLEMENTED log
ret
.endproc

View File

@@ -0,0 +1,21 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of pow
* FILE: lib/sdk/crt/math/amd64/pow.S
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
/* INCLUDES ******************************************************************/
#include <ndk/amd64/asm.h>
#include <ndk/amd64/asmmacro.S>
.intel_syntax noprefix
.proc pow
UNIMPLEMENTED pow
ret
.endproc

View File

@@ -0,0 +1,21 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of sin
* FILE: lib/sdk/crt/math/amd64/sin.S
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
/* INCLUDES ******************************************************************/
#include <ndk/amd64/asm.h>
#include <ndk/amd64/asmmacro.S>
.intel_syntax noprefix
.proc sin
UNIMPLEMENTED sin
ret
.endproc

View File

@@ -0,0 +1,21 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of sqrt
* FILE: lib/sdk/crt/math/amd64/sqrt.S
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
/* INCLUDES ******************************************************************/
#include <ndk/amd64/asm.h>
#include <ndk/amd64/asmmacro.S>
.intel_syntax noprefix
.proc sqrt
UNIMPLEMENTED sqrt
ret
.endproc

View File

@@ -0,0 +1,21 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of tan
* FILE: lib/sdk/crt/math/amd64/tan.S
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
/* INCLUDES ******************************************************************/
#include <ndk/amd64/asm.h>
#include <ndk/amd64/asmmacro.S>
.intel_syntax noprefix
.proc tan
UNIMPLEMENTED tan
ret
.endproc