This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Reverse arguments of fdivp


On Monday, April 16, 2012 03:06:24 Marek Polacek wrote:
> When building libc on i?86, gas complains:
> ../sysdeps/i386/fpu/bits/fenv.h:124: Warning: translating to `fdivp
> %st,%st(1)'.  This patch corrects this issue.  Tested on i686-linux,
> ok for trunk?
> 
> 2012-04-16  Marek Polacek  <polacek@redhat.com>
> 
> 	* sysdeps/i386/fpu/bits/fenv.h (feraiseexcept): Reverse the
> 	operands of fdivp instruction.

Thanks, this looks fine,
Andreas

> --- libc/sysdeps/i386/fpu/bits/fenv.h.mp	2012-04-16 01:40:34.953232441
> +0200 +++ libc/sysdeps/i386/fpu/bits/fenv.h	2012-04-16
> 01:42:23.129494724 +0200 @@ -1,4 +1,4 @@
> -/* Copyright (C) 1997, 1998, 1999, 2000, 2011 Free Software Foundation,
> Inc. +/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
>     This file is part of the GNU C Library.
> 
>     The GNU C Library is free software; you can redistribute it and/or
> @@ -121,7 +121,7 @@ __NTH (feraiseexcept (int __excepts))
>  # ifdef __SSE_MATH__
>  	  __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
>  # else
> -	  __asm__ __volatile__ ("fdivp %%st(1), %%st; fwait"
> +	  __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait"
> 
>  				: "=t" (__f) : "0" (__f), "u" (__g) : "st(1)");
> 
>  # endif
>  	  (void) &__f;
> 
> 	Marek

-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


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