From fd0fe37dd9d66bf7dc7effe3e4ddb2f192e5debb Mon Sep 17 00:00:00 2001 From: Dmitry Gorbachev Date: Mon, 3 Oct 2011 20:57:43 +0000 Subject: [PATCH] [INTRIN] Use "unsigned int" for x86 __writecr*(), as it is (reportedly) used in VS10 headers. svn path=/trunk/; revision=53979 --- reactos/include/crt/mingw32/intrin_x86.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/reactos/include/crt/mingw32/intrin_x86.h b/reactos/include/crt/mingw32/intrin_x86.h index fa6e86ad753..509a059d61a 100644 --- a/reactos/include/crt/mingw32/intrin_x86.h +++ b/reactos/include/crt/mingw32/intrin_x86.h @@ -1235,6 +1235,7 @@ __INTRIN_INLINE void __halt(void) /*** 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 @@ __INTRIN_INLINE void __writecr4(const unsigned __int64 Data) __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 @@ __INTRIN_INLINE unsigned __int64 __readcr8(void) 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;