This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fix for 980414-1.c testcase


I don't do floating point and I'm not intel assembly geek.   I do know
that not all assemblers support the same comment character.

Could someone please verify that this change is correct and doesn't
violate the original test case?  It now passes on OpenServer COFF, ELF,
and PIC with the native assembler (it previously hurled on the '#'
characters under COFF) as well still as still passing on Linux/x86.

Thanx,
RJL



Index: gcc/testsuite/gcc.dg/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/06/17 19:23:57
@@ -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__


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]