small i386 optimization

Richard Henderson (richard@atheist.tamu.edu)
Thu, 29 Feb 1996 02:21:47 -0600 (CST)


The following allows the compiler more freedom in register allocation.

r~

--- include/asm-i386/system.h.orig Sun Feb 18 14:41:52 1996
+++ include/asm-i386/system.h Wed Feb 28 21:48:50 1996
@@ -225,10 +225,10 @@
#define cli() __asm__ __volatile__ ("cli": : :"memory")

#define save_flags(x) \
-__asm__ __volatile__("pushfl ; popl %0":"=r" (x): /* no input */ :"memory")
+__asm__ __volatile__("pushfl; popl %0" : "=rm" (x): /* no input */ : "memory")

#define restore_flags(x) \
-__asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"r" (x):"memory")
+__asm__ __volatile__("pushl %0; popfl": /* no output */ : "rmi" (x) : "memory")

#define iret() __asm__ __volatile__ ("iret": : :"memory")