This is the mail archive of the libc-alpha@cygnus.com 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]

libm-i387 fdim bug (`gas' incompatibility)


>Submitter-Id: net
>Originator: Eugene M. Indenbom
>Organization:  Space Research Institute, Moscow, Russia
>Confidential: no
>Synopsis: fdim* math function returns bad result
>Severity: <[ non-critical | serious | critical ] (one line)>
>Priority: <[ low | medium | high ] (one line)>
>Category: libc
>Class:  <[ sw-bug | doc-bug | change-request | support ] (one line)>
>Release: libc-2.0.112
>Environment:
Host type: i586-pc-linux-gnu
System: Linux tver 2.2.0 #1 SMP Tue Jan 26 10:42:08 MSK 1999 i686 unknown
Architecture: i686
 
Addons: crypt linuxthreads
 
Build CC: gcc
Compiler version: egcs-2.91.60 19981201 (egcs-1.1.1 release)
Kernel headers: 2.2.0
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: yes
Build bounded: no
Build static-nss: no
Stdio: libio
 
Binutils: 2.9.1.0.19a
 
>Description:
 fdim* from libm.so returns -real value:
 libm_fdim( x, y ) = -real_fdim( x, y )
>How-To-Repeat:
 make check
>Fix:
 the problem arises from assembler fsubrp operands order
 in sysdeps/libm-i387/s_fdim*.S. The current behavior of 'as'
 (starting at least from binutils-2.9.1.0.7) is that operand
 order makes difference so:
 fsubrp %st(1), %st <==> fsubp %st, %st(1)
 and is not equivalent to expected:
 fsubrp %st, %st(1)
 
 Unified diffs fixing problem are attached to this message.

glibc-2.0.112.patch


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