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]

Re: fix for 980414-1.c testcase (committed)


robertl> Could someone please verify that this change is correct and doesn't
robertl> violate the original test case?  It now passes on OpenServer COFF, ELF,
robertl> and PIC with the native assembler (it previously hurled on the '#'
> 
hjl> It looks ok to me. My testcase is derived from glibc. Those asm codes
hjl> are gas specific. Ulrich, I don't think we should use gas specific
hjl> syntax in glibc if possible.

If it's a goal for glibc to run on systems where GAS isn't up to the task,
that would be a good plan.   I'll leave that to you and Ulrich to decide.

I've now committed this fix.  

Thanx for the help.

RJL

        * gcc.dg/980414-1.c: Move comments outside of ASM to improve
        compatibility with assmblers with a different comment character.
        Eliminate use of GAS-specific extensions.


> >   > 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)

-- 
Robert Lipe       http://www.dgii.com/people/robertl       robertl@dgii.com
              (WEB ADDRESS MAY BE TEMPORARILY UNAVAILABLE)




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