This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix for 980414-1.c testcase
- To: law at cygnus dot com
- Subject: Re: fix for 980414-1.c testcase
- From: hjl at lucon dot org (H.J. Lu)
- Date: Fri, 19 Jun 1998 07:51:53 -0700 (PDT)
- Cc: robertl at dgii dot com, egcs-patches at cygnus dot com, drepper at cygnus dot com (Ulrich Drepper)
>
>
> In message <19980617142703.A16477@dgii.com>you write:
> > 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.
> Likewise. I believe this is one of HJ's tests.
>
> HJ -- can you comment on this proposed change?
It looks ok to me. My testcase is derived from glibc. Those asm codes
are gas specific. Ulrich, I don't think we should use gas specific
syntax in glibc if possible.
>
> > 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__
>
--
H.J. Lu (hjl@gnu.org)