[INTRIN]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Fri, 19 Nov 2010 13:55:58 +0000 (13:55 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Fri, 19 Nov 2010 13:55:58 +0000 (13:55 +0000)
Add a workaround for __readcr4, MSVC suffers an internal error when using the intrinsic and optimization is on.

svn path=/branches/cmake-bringup/; revision=49628

include/crt/msc/intrin.h

index 5999ddd..bd903e3 100644 (file)
@@ -283,7 +283,12 @@ void __writedr(unsigned reg, unsigned __int64 value);
 unsigned long __readcr0(void);
 unsigned long __readcr2(void);
 unsigned long __readcr3(void);
 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
+
 unsigned int __readdr(unsigned int reg);
 void __writedr(unsigned reg, unsigned int value);
 #endif
 unsigned int __readdr(unsigned int reg);
 void __writedr(unsigned reg, unsigned int value);
 #endif