mirror of
https://github.com/reactos/reactos.git
synced 2025-06-27 20:19:50 +00:00
[CRT]
- Add __readcr4 to crt to compensate for MSVC bug - Compile strnset with MSVC svn path=/branches/cmake-bringup/; revision=49669
This commit is contained in:
parent
e11826a832
commit
f90a97e5a6
4 changed files with 17 additions and 8 deletions
|
@ -283,12 +283,9 @@ 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)
|
||||||
// HACK: MSVC is broken
|
#pragma function(__readcr4) // 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
|
||||||
|
|
|
@ -336,6 +336,7 @@ list(APPEND CRT_SOURCE
|
||||||
mem/i386/memchr_asm.s
|
mem/i386/memchr_asm.s
|
||||||
mem/i386/memmove_asm.s
|
mem/i386/memmove_asm.s
|
||||||
mem/i386/memset_asm.s
|
mem/i386/memset_asm.s
|
||||||
|
misc/i386/readcr4.S
|
||||||
string/i386/strcat_asm.s
|
string/i386/strcat_asm.s
|
||||||
string/i386/strchr_asm.s
|
string/i386/strchr_asm.s
|
||||||
string/i386/strcmp_asm.s
|
string/i386/strcmp_asm.s
|
||||||
|
|
12
lib/sdk/crt/misc/i386/readcr4.S
Normal file
12
lib/sdk/crt/misc/i386/readcr4.S
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
#include <asm.inc>
|
||||||
|
|
||||||
|
.code
|
||||||
|
|
||||||
|
PUBLIC ___readcr4
|
||||||
|
___readcr4:
|
||||||
|
mov eax, cr4
|
||||||
|
ret
|
||||||
|
|
||||||
|
END
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
* 25/11/05: Added license header
|
* 25/11/05: Added license header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(__clang__)
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
#define __int64 long long
|
#define __int64 long long
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#pragma function(_strset)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
|
@ -52,4 +52,3 @@ char* _strset(char* szToFill, int szFill)
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue