[ros-diffs] [tkreuzer] 49669: [CRT] - Add __readcr4 to crt to compensate for MSVC bug - Compile strnset with MSVC

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Sat Nov 20 16:38:46 UTC 2010


Author: tkreuzer
Date: Sat Nov 20 16:38:45 2010
New Revision: 49669

URL: http://svn.reactos.org/svn/reactos?rev=49669&view=rev
Log:
[CRT]
- Add __readcr4 to crt to compensate for MSVC bug
- Compile strnset with MSVC

Added:
    branches/cmake-bringup/lib/sdk/crt/misc/i386/   (with props)
    branches/cmake-bringup/lib/sdk/crt/misc/i386/readcr4.S   (with props)
Modified:
    branches/cmake-bringup/include/crt/msc/intrin.h
    branches/cmake-bringup/lib/sdk/crt/CMakeLists.txt
    branches/cmake-bringup/lib/sdk/crt/string/strset.c

Modified: branches/cmake-bringup/include/crt/msc/intrin.h
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/crt/msc/intrin.h?rev=49669&r1=49668&r2=49669&view=diff
==============================================================================
--- branches/cmake-bringup/include/crt/msc/intrin.h [iso-8859-1] (original)
+++ branches/cmake-bringup/include/crt/msc/intrin.h [iso-8859-1] Sat Nov 20 16:38:45 2010
@@ -283,12 +283,9 @@
 unsigned long __readcr0(void);
 unsigned long __readcr2(void);
 unsigned long __readcr3(void);
-//unsigned long __readcr4(void);
+unsigned long __readcr4(void);
 //#pragma intrinsic(__readcr4)
-// HACK: MSVC is broken
-unsigned long  ___readcr4(void);
-#define __readcr4 ___readcr4
-
+#pragma function(__readcr4) // HACK: MSVC is broken
 unsigned int __readdr(unsigned int reg);
 void __writedr(unsigned reg, unsigned int value);
 #endif

Modified: branches/cmake-bringup/lib/sdk/crt/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/CMakeLists.txt?rev=49669&r1=49668&r2=49669&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/CMakeLists.txt [iso-8859-1] Sat Nov 20 16:38:45 2010
@@ -336,6 +336,7 @@
     mem/i386/memchr_asm.s
     mem/i386/memmove_asm.s
     mem/i386/memset_asm.s
+    misc/i386/readcr4.S
     string/i386/strcat_asm.s
     string/i386/strchr_asm.s
     string/i386/strcmp_asm.s

Propchange: branches/cmake-bringup/lib/sdk/crt/misc/i386/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Sat Nov 20 16:38:45 2010
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)

Propchange: branches/cmake-bringup/lib/sdk/crt/misc/i386/
------------------------------------------------------------------------------
    bugtraq:message = See issue #%BUGID% for more details.

Propchange: branches/cmake-bringup/lib/sdk/crt/misc/i386/
------------------------------------------------------------------------------
    bugtraq:url = http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%

Propchange: branches/cmake-bringup/lib/sdk/crt/misc/i386/
------------------------------------------------------------------------------
    tsvn:logminsize = 10

Added: branches/cmake-bringup/lib/sdk/crt/misc/i386/readcr4.S
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/misc/i386/readcr4.S?rev=49669&view=auto
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/misc/i386/readcr4.S (added)
+++ branches/cmake-bringup/lib/sdk/crt/misc/i386/readcr4.S [iso-8859-1] Sat Nov 20 16:38:45 2010
@@ -1,0 +1,12 @@
+
+#include <asm.inc>
+
+.code
+
+PUBLIC ___readcr4
+___readcr4:
+    mov eax, cr4
+    ret
+
+END
+

Propchange: branches/cmake-bringup/lib/sdk/crt/misc/i386/readcr4.S
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: branches/cmake-bringup/lib/sdk/crt/string/strset.c
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/string/strset.c?rev=49669&r1=49668&r2=49669&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/string/strset.c [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/string/strset.c [iso-8859-1] Sat Nov 20 16:38:45 2010
@@ -8,10 +8,10 @@
  *              25/11/05: Added license header
  */
 
-#ifndef _MSC_VER
-
 #if defined(__GNUC__) && !defined(__clang__)
 #define __int64 long long
+#elif defined(_MSC_VER)
+#pragma function(_strset)
 #endif
 
 #ifdef _WIN64
@@ -52,4 +52,3 @@
 	return t;
 }
 
-#endif




More information about the Ros-diffs mailing list