Fix (?) for 980414-1 failure on gas-not.

Robert Lipe robertl@dgii.com
Wed May 27 20:00:00 GMT 1998


Could someone that understands x86 FP please look at this proposed
patch and see if I've actually *changed* this test?  I simply made the 
source look like the Linux disassembly output.   I don't know if this is
masking a bug in GAS or not.  I also moved the comments out of the asm
since not all assemblers use the same comment character.

The result passes on both Linux (with GAS) and OpenServer (SCO assembler
in ELF and COFF) modes, but I don't know if in making the test compile
if I've perhaps changed the meaning of the program in some silent way.

Thanx.

RJL

Index: 980414-1.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/testsuite/gcc.dg/980414-1.c,v
retrieving revision 1.1
diff -u -p -r1.1 980414-1.c
--- 980414-1.c	1998/04/19 23:40:30	1.1
+++ 980414-1.c	1998/05/28 02:54:55
@@ -29,12 +29,12 @@ mypow (double __x, double __y)
 	}
     }
   __asm __volatile__
-    ("fmul	%%st(1)		# y * log2(x)\n\t"
-     "fstl	%%st(1)\n\t"
-     "frndint			# int(y * log2(x))\n\t"
+    ("fmul	%%st(1),%%st\n\t"	/* y * log2(x) */
+     "fst	%%st(1)\n\t"
+     "frndint\n\t"			/* int(y * log2(x)) */
      "fxch\n\t"
-     "fsub	%%st(1)		# fract(y * log2(x))\n\t"
-     "f2xm1			# 2^(fract(y * log2(x))) - 1\n\t"
+     "fsub	%%st(1),%%st\n\t"	/* fract(y * log2(x)) */
+     "f2xm1\n\t"			/* 2^(fract(y * log2(x))) - 1 */
      : "=t" (__value), "=u" (__exponent) :  "0" (__x), "1" (__y));
   __value += 1.0;
   __asm __volatile__

RJL



More information about the Gcc-patches mailing list