mirror of
https://github.com/reactos/reactos.git
synced 2025-01-10 16:18:16 +00:00
[CRT]
- Use ___readcr4 instead of __readcr4, because MSVC doesn't like this intrinsic to be redefined. - Add _ftol2 svn path=/branches/cmake-bringup/; revision=49679
This commit is contained in:
parent
1a4c47df9e
commit
0b8509a565
4 changed files with 38 additions and 5 deletions
|
@ -283,9 +283,12 @@ void __writedr(unsigned reg, unsigned __int64 value);
|
||||||
unsigned long __readcr0(void);
|
unsigned long __readcr0(void);
|
||||||
unsigned long __readcr2(void);
|
unsigned long __readcr2(void);
|
||||||
unsigned long __readcr3(void);
|
unsigned long __readcr3(void);
|
||||||
unsigned long __readcr4(void);
|
//unsigned long __readcr4(void);
|
||||||
//#pragma intrinsic(__readcr4)
|
//#pragma intrinsic(__readcr4)
|
||||||
#pragma function(__readcr4) // HACK: MSVC is broken
|
// HACK: MSVC is broken
|
||||||
|
unsigned long ___readcr4(void);
|
||||||
|
#define __readcr4 ___readcr4
|
||||||
|
|
||||||
unsigned int __readdr(unsigned int reg);
|
unsigned int __readdr(unsigned int reg);
|
||||||
void __writedr(unsigned reg, unsigned int value);
|
void __writedr(unsigned reg, unsigned int value);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -486,12 +486,14 @@ list(APPEND LIBCNTPR_SOURCE
|
||||||
math/i386/fabs_asm.s
|
math/i386/fabs_asm.s
|
||||||
math/i386/floor_asm.s
|
math/i386/floor_asm.s
|
||||||
math/i386/ftol_asm.s
|
math/i386/ftol_asm.s
|
||||||
|
math/i386/ftol2_asm.s
|
||||||
math/i386/log_asm.s
|
math/i386/log_asm.s
|
||||||
math/i386/pow_asm.s
|
math/i386/pow_asm.s
|
||||||
math/i386/sin_asm.s
|
math/i386/sin_asm.s
|
||||||
math/i386/sqrt_asm.s
|
math/i386/sqrt_asm.s
|
||||||
math/i386/tan_asm.s
|
math/i386/tan_asm.s
|
||||||
math/i386/ci.c)
|
math/i386/ci.c
|
||||||
|
misc/i386/readcr4.S)
|
||||||
elseif(ARCH MATCHES amd64)
|
elseif(ARCH MATCHES amd64)
|
||||||
list(APPEND LIBCNTPR_SOURCE
|
list(APPEND LIBCNTPR_SOURCE
|
||||||
math/cos.c
|
math/cos.c
|
||||||
|
|
28
lib/sdk/crt/math/i386/ftol2_asm.s
Normal file
28
lib/sdk/crt/math/i386/ftol2_asm.s
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS kernel
|
||||||
|
* PURPOSE: Run-Time Library
|
||||||
|
* FILE: lib/rtl/i386/ftol2.S
|
||||||
|
* PROGRAMER:
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <asm.inc>
|
||||||
|
|
||||||
|
EXTERN __ftol:PROC
|
||||||
|
PUBLIC __ftol2
|
||||||
|
PUBLIC __ftol2_sse
|
||||||
|
|
||||||
|
/* FUNCTIONS ***************************************************************/
|
||||||
|
.code
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This routine is called by MSVC-generated code to convert from floating point
|
||||||
|
* to integer representation. The floating point number to be converted is
|
||||||
|
* on the top of the floating point stack.
|
||||||
|
*/
|
||||||
|
__ftol2:
|
||||||
|
__ftol2_sse:
|
||||||
|
jmp __ftol
|
||||||
|
|
||||||
|
END
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|
||||||
PUBLIC ___readcr4
|
PUBLIC ____readcr4
|
||||||
___readcr4:
|
____readcr4:
|
||||||
mov eax, cr4
|
mov eax, cr4
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue