From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@gmail.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] bits/mathdef.h changes for s390 and ia64, ldbl-128 fmal fix
Date: Wed, 20 Oct 2010 11:30:00 -0000 [thread overview]
Message-ID: <20101020112957.GD21391@sunsite.ms.mff.cuni.cz> (raw)
Hi!
This provides FP_FAST* definitions for ia64 and s390{,x} and fixes a buglet
in ldbl-128 fmal.
2010-10-20 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ia64/bits/mathdef.h (FP_FAST_FMA, FP_FAST_FMAF,
FP_FAST_FMAL): Define.
* sysdeps/s390/bits/mathdef.h (FP_FAST_FMA, FP_FAST_FMAF): Likewise.
* sysdeps/ieee754/ldbl-128/s_fmal.c (__fmal): Fix up inline asm.
--- libc/sysdeps/ia64/bits/mathdef.h
+++ libc/sysdeps/ia64/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2004, 2010 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
@@ -34,4 +34,9 @@ typedef double double_t; /* `double' expressions are evaluated as
# define FP_ILOGB0 (-2147483647 - 1)
# define FP_ILOGBNAN 2147483647
+/* The IA-64 architecture has fused multiply/add instructions. */
+# define FP_FAST_FMA 1
+# define FP_FAST_FMAF 1
+# define FP_FAST_FMAL 1
+
#endif /* ISO C99 */
--- libc/sysdeps/ieee754/ldbl-128/s_fmal.c
+++ libc/sysdeps/ieee754/ldbl-128/s_fmal.c
@@ -176,7 +176,7 @@ __fmal (long double x, long double y, long double z)
u.ieee.mantissa3 |= fetestexcept (FE_INEXACT) != 0;
v.d = a1 + u.d;
/* Ensure the addition is not scheduled after fetestexcept call. */
- asm volatile ("" : "m" (v));
+ asm volatile ("" : : "m" (v));
int j = fetestexcept (FE_INEXACT) != 0;
feupdateenv (&env);
/* Ensure the following computations are performed in default rounding
--- libc/sysdeps/s390/bits/mathdef.h
+++ libc/sysdeps/s390/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2004, 2006
+/* Copyright (C) 1997, 1998, 1999, 2000, 2004, 2006, 2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -35,4 +35,8 @@ typedef double double_t; /* `double' expressions are evaluated as
# define FP_ILOGB0 (-2147483647)
# define FP_ILOGBNAN 2147483647
+/* The S/390 architecture has fused multiply/add instructions. */
+# define FP_FAST_FMA 1
+# define FP_FAST_FMAF 1
+
#endif /* ISO C99 */
Jakub
reply other threads:[~2010-10-20 11:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101020112957.GD21391@sunsite.ms.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@gmail.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).