Author: tkreuzer
Date: Thu Sep 4 14:39:29 2008
New Revision: 35950
URL:
http://svn.reactos.org/svn/reactos?rev=35950&view=rev
Log:
implement __readeflags and __writeeflags
Modified:
branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h
Modified: branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h [iso-8859-1] Thu Sep 4
14:39:29 2008
@@ -1064,6 +1064,17 @@
return retval;
}
+static __inline__ __attribute__((always_inline)) void __writeeflags(uintptr_t Value)
+{
+ __asm__ __volatile__("push %0\n popf" : : "rim"(Value));
+}
+
+static __inline__ __attribute__((always_inline)) uintptr_t __readeflags(void)
+{
+ uintptr_t retval;
+ __asm__ __volatile__("pushf\n pop %0" : "=rm"(retval));
+ return retval;
+}
/*** Interrupts ***/
static __inline__ __attribute__((always_inline)) void __debugbreak(void)