mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
4e9bf327ad
The i386 implementations of nearbyint functions, and x86_64
nearbyintl, contain code to mask the "inexact" exception. However,
the fnstenv instruction has the effect of masking all exceptions, so
this masking code has been redundant since fnstenv was added to those
implementations (by commit 846d9a4a3acdb4939ca7bf6aed48f9f6f26911be;
commit 71d1b0166b
added the test
math/test-nearbyint-except-2.c that verifies these functions do work
when called with "inexact" traps enabled); this patch removes the
redundant code.
Tested for x86_64 and x86.
* sysdeps/i386/fpu/s_nearbyint.S (__nearbyint): Do not mask
"inexact" exceptions after fnstenv.
* sysdeps/i386/fpu/s_nearbyintf.S (__nearbyintf): Likewise.
* sysdeps/i386/fpu/s_nearbyintl.S (__nearbyintl): Likewise.
* sysdeps/x86_64/fpu/s_nearbyintl.S (__nearbyintl): Likewise.
21 lines
396 B
ArmAsm
21 lines
396 B
ArmAsm
/*
|
|
* Written by J.T. Conklin <jtc@netbsd.org>.
|
|
* Public domain.
|
|
*/
|
|
/* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */
|
|
|
|
#include <machine/asm.h>
|
|
|
|
ENTRY(__nearbyint)
|
|
fldl 4(%esp)
|
|
subl $32, %esp
|
|
cfi_adjust_cfa_offset (32)
|
|
fnstenv 4(%esp)
|
|
frndint
|
|
fldenv 4(%esp)
|
|
addl $32, %esp
|
|
cfi_adjust_cfa_offset (-32)
|
|
ret
|
|
END (__nearbyint)
|
|
weak_alias (__nearbyint, nearbyint)
|