[ros-diffs] [dgorbachev] 53979: [INTRIN] Use "unsigned int" for x86 __writecr*(), as it is (reportedly) used in VS10 headers.

dgorbachev at svn.reactos.org dgorbachev at svn.reactos.org
Mon Oct 3 20:57:43 UTC 2011


Author: dgorbachev
Date: Mon Oct  3 20:57:43 2011
New Revision: 53979

URL: http://svn.reactos.org/svn/reactos?rev=53979&view=rev
Log:
[INTRIN]
Use "unsigned int" for x86 __writecr*(), as it is (reportedly) used in VS10 headers.

Modified:
    trunk/reactos/include/crt/mingw32/intrin_x86.h

Modified: trunk/reactos/include/crt/mingw32/intrin_x86.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/intrin_x86.h?rev=53979&r1=53978&r2=53979&view=diff
==============================================================================
--- trunk/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] Mon Oct  3 20:57:43 2011
@@ -1235,6 +1235,7 @@
 
 /*** Protected memory management ***/
 
+#ifdef _M_AMD64
 __INTRIN_INLINE void __writecr0(const unsigned __int64 Data)
 {
 	__asm__("mov %[Data], %%cr0" : : [Data] "r" (Data) : "memory");
@@ -1250,7 +1251,6 @@
 	__asm__("mov %[Data], %%cr4" : : [Data] "r" (Data) : "memory");
 }
 
-#ifdef _M_AMD64
 __INTRIN_INLINE void __writecr8(const unsigned __int64 Data)
 {
 	__asm__("mov %[Data], %%cr8" : : [Data] "r" (Data) : "memory");
@@ -1291,6 +1291,21 @@
 	return value;
 }
 #else
+__INTRIN_INLINE void __writecr0(const unsigned int Data)
+{
+	__asm__("mov %[Data], %%cr0" : : [Data] "r" (Data) : "memory");
+}
+
+__INTRIN_INLINE void __writecr3(const unsigned int Data)
+{
+	__asm__("mov %[Data], %%cr3" : : [Data] "r" (Data) : "memory");
+}
+
+__INTRIN_INLINE void __writecr4(const unsigned int Data)
+{
+	__asm__("mov %[Data], %%cr4" : : [Data] "r" (Data) : "memory");
+}
+
 __INTRIN_INLINE unsigned long __readcr0(void)
 {
 	unsigned long value;




More information about the Ros-diffs mailing list