summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/fpu/bits/mathinline.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/sysdeps/i386/fpu/bits/mathinline.h b/sysdeps/i386/fpu/bits/mathinline.h
index 8e7a867ec6..28547d44b8 100644
--- a/sysdeps/i386/fpu/bits/mathinline.h
+++ b/sysdeps/i386/fpu/bits/mathinline.h
@@ -532,16 +532,17 @@ __inline_mathcodeNP (floor, __x, \
   register int __ignore;						      \
   unsigned short int __cw;						      \
   unsigned short int __cwtmp;						      \
-  __asm __volatile ("fnstcw %4\n\t"					      \
-		    "movzwl %4, %1\n\t"					      \
+  __asm __volatile ("fnstcw %3\n\t"					      \
+		    "movzwl %3, %1\n\t"					      \
 		    "andl $0xf3ff, %1\n\t"				      \
 		    "orl $0x0400, %1\n\t"	/* rounding down */	      \
-		    "movw %1, %3\n\t"					      \
-		    "fldcw %3\n\t"					      \
+		    "movw %w1, %2\n\t"					      \
+		    "fldcw %2\n\t"					      \
 		    "frndint\n\t"					      \
-		    "fldcw %4"						      \
-		    : "=t" (__value), "=&q" (__ignore)			      \
-		    : "0" (__x), "m" (__cwtmp), "m" (__cw));		      \
+		    "fldcw %3"						      \
+		    : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp),	      \
+		      "=m" (__cw)					      \
+		    : "0" (__x));					      \
   return __value)
 
 __inline_mathcodeNP (ceil, __x, \
@@ -549,16 +550,17 @@ __inline_mathcodeNP (ceil, __x, \
   register int __ignore;						      \
   unsigned short int __cw;						      \
   unsigned short int __cwtmp;						      \
-  __asm __volatile ("fnstcw %4\n\t"					      \
-		    "movzwl %4, %1\n\t"					      \
+  __asm __volatile ("fnstcw %3\n\t"					      \
+		    "movzwl %3, %1\n\t"					      \
 		    "andl $0xf3ff, %1\n\t"				      \
 		    "orl $0x0800, %1\n\t"	/* rounding up */	      \
-		    "movw %1, %3\n\t"					      \
-		    "fldcw %3\n\t"					      \
+		    "movw %w1, %2\n\t"					      \
+		    "fldcw %2\n\t"					      \
 		    "frndint\n\t"					      \
-		    "fldcw %4"						      \
-		    : "=t" (__value), "=&q" (__ignore)			      \
-		    : "0" (__x), "m" (__cwtmp), "m" (__cw));		      \
+		    "fldcw %3"						      \
+		    : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp),	      \
+		      "=m" (__cw)					      \
+		    : "0" (__x));					      \
   return __value)
 
 #ifdef __FAST_MATH__