mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 16:51:18 +00:00
[LIBCNTPR] Add atan2
[WIN32K] Remove duplicated floating point math functions [CPORTLIB] Fix an MSVC warning svn path=/trunk/; revision=57460
This commit is contained in:
parent
c9ef130688
commit
87faae19de
8 changed files with 8 additions and 285 deletions
|
@ -144,7 +144,7 @@ CpSetBaud(IN PCPPORT Port,
|
|||
WRITE_PORT_UCHAR(Port->Address + LINE_CONTROL_REGISTER, Lcr | SERIAL_LCR_DLAB);
|
||||
|
||||
/* Set baud rate */
|
||||
Mode = 115200 / Rate;
|
||||
Mode = (USHORT)(115200 / Rate);
|
||||
WRITE_PORT_UCHAR(Port->Address + DIVISOR_LATCH_MSB, (UCHAR)((Mode >> 8) & 0xff));
|
||||
WRITE_PORT_UCHAR(Port->Address + DIVISOR_LATCH_LSB, (UCHAR)(Mode & 0xff));
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ if(ARCH STREQUAL "i386")
|
|||
math/i386/allshl_asm.s
|
||||
math/i386/allshr_asm.s
|
||||
math/i386/atan_asm.s
|
||||
math/i386/atan2_asm.s
|
||||
math/i386/aulldiv_asm.s
|
||||
math/i386/aulldvrm_asm.s
|
||||
math/i386/aullrem_asm.s
|
||||
|
|
|
@ -194,12 +194,7 @@ list(APPEND SOURCE
|
|||
gdi/dib/i386/dib24bpp_hline.s
|
||||
gdi/dib/i386/dib32bpp_hline.s
|
||||
gdi/dib/i386/dib32bpp_colorfill.s
|
||||
gdi/eng/i386/floatobj.S
|
||||
user/ntuser/misc/i386/cos_asm.s
|
||||
user/ntuser/misc/i386/sin_asm.s
|
||||
user/ntuser/misc/i386/atan2_asm.s
|
||||
user/ntuser/misc/i386/floor_asm.s
|
||||
user/ntuser/misc/i386/ceil_asm.s)
|
||||
gdi/eng/i386/floatobj.S)
|
||||
else()
|
||||
list(APPEND SOURCE
|
||||
gdi/dib/dib24bppc.c
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: Run-Time Library
|
||||
* FILE: lib/rtl/i386/atan.S
|
||||
* PROGRAMER: Alex Ionescu (alex@relsoft.net)
|
||||
*
|
||||
* Copyright (C) 2002 Michael Ringgaard.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the project nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <asm.inc>
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
.code
|
||||
|
||||
PUBLIC _atan2
|
||||
_atan2:
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
fld qword ptr [ebp+8] // Load real from stack
|
||||
fld qword ptr [ebp+16] // Load real from stack
|
||||
fpatan // Take the arctangent
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
END
|
|
@ -1,59 +0,0 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: Run-Time Library
|
||||
* FILE: lib/rtl/i386/ceil.S
|
||||
* PROGRAMER: Alex Ionescu (alex@relsoft.net)
|
||||
*
|
||||
* Copyright (C) 2002 Michael Ringgaard.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the project nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <asm.inc>
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
.code
|
||||
|
||||
PUBLIC _ceil
|
||||
_ceil:
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4 // Allocate temporary space
|
||||
fld qword ptr [ebp+8] // Load real from stack
|
||||
fstcw [ebp-2] // Save control word
|
||||
fclex // Clear exceptions
|
||||
mov word ptr [ebp-4],HEX(b63) // Rounding control word
|
||||
fldcw [ebp-4] // Set new rounding control
|
||||
frndint // Round to integer
|
||||
fclex // Clear exceptions
|
||||
fldcw [ebp-2] // Restore control word
|
||||
mov esp,ebp // Deallocate temporary space
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
END
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: Run-Time Library
|
||||
* FILE: lib/rtl/i386/cos.S
|
||||
* PROGRAMER: Alex Ionescu (alex@relsoft.net)
|
||||
*
|
||||
* Copyright (C) 2002 Michael Ringgaard.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the project nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <asm.inc>
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
.code
|
||||
|
||||
PUBLIC _cos
|
||||
_cos:
|
||||
push ebp
|
||||
mov ebp,esp // Point to the stack frame
|
||||
fld qword ptr [ebp+8] // Load real from stack
|
||||
fcos // Take the cosine
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
END
|
|
@ -1,59 +0,0 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: Run-Time Library
|
||||
* FILE: lib/rtl/i386/floor.S
|
||||
* PROGRAMER: Alex Ionescu (alex@relsoft.net)
|
||||
*
|
||||
* Copyright (C) 2002 Michael Ringgaard.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the project nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <asm.inc>
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
.code
|
||||
|
||||
PUBLIC _floor
|
||||
_floor:
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4 // Allocate temporary space
|
||||
fld qword ptr [ebp+8] // Load real from stack
|
||||
fstcw [ebp-2] // Save control word
|
||||
fclex // Clear exceptions
|
||||
mov word ptr [ebp-4],HEX(763) // Rounding control word
|
||||
fldcw [ebp-4] // Set new rounding control
|
||||
frndint // Round to integer
|
||||
fclex // Clear exceptions
|
||||
fldcw [ebp-2] // Restore control word
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
END
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: Run-Time Library
|
||||
* FILE: lib/rtl/i386/sin.S
|
||||
* PROGRAMER: Alex Ionescu (alex@relsoft.net)
|
||||
*
|
||||
* Copyright (C) 2002 Michael Ringgaard.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the project nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <asm.inc>
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
.code
|
||||
|
||||
PUBLIC _sin
|
||||
_sin:
|
||||
push ebp // Save register bp
|
||||
mov ebp,esp // Point to the stack frame
|
||||
fld qword ptr [ebp+8] // Load real from stack
|
||||
fsin // Take the sine
|
||||
pop ebp // Restore register bp
|
||||
ret
|
||||
|
||||
END
|
Loading…
Reference in a new issue