patch-2.1.124 linux/include/asm-i386/system.h

Next file: linux/include/asm-i386/termios.h
Previous file: linux/include/asm-i386/processor.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.123/linux/include/asm-i386/system.h linux/include/asm-i386/system.h
@@ -104,14 +104,16 @@
  * Clear and set 'TS' bit respectively
  */
 #define clts() __asm__ __volatile__ ("clts")
-#define stts() \
-__asm__ __volatile__ ( \
-	"movl %%cr0,%%eax\n\t" \
-	"orl $8,%%eax\n\t" \
-	"movl %%eax,%%cr0" \
-	: /* no outputs */ \
-	: /* no inputs */ \
-	:"ax")
+#define read_cr0() ({ \
+	unsigned int __dummy; \
+	__asm__( \
+		"movl %%cr0,%0\n\t" \
+		:"=r" (__dummy)); \
+	__dummy; \
+})
+#define write_cr0(x) \
+	__asm__("movl %0,%%cr0": :"r" (x));
+#define stts() write_cr0(8 | read_cr0())
 
 #endif	/* __KERNEL__ */
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov