[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r11843 - in /trunk: libc/ libc/bits/ libc/math/ libc/nptl/ libc/nptl/sysdeps/x86_64/ libc/scripts/data/ libc/sysdeps/i386/bi...



Author: joseph
Date: Thu Oct 21 17:19:23 2010
New Revision: 11843

Log:
Merge changes between r11760 and r11842 from /fsf/trunk.

Added:
    trunk/libc/scripts/data/localplt-s390-linux-gnu.data
      - copied unchanged from r11842, fsf/trunk/libc/scripts/data/localplt-s390-linux-gnu.data
    trunk/libc/scripts/data/localplt-s390x-linux-gnu.data
      - copied unchanged from r11842, fsf/trunk/libc/scripts/data/localplt-s390x-linux-gnu.data
    trunk/libc/sysdeps/ieee754/dbl-64/s_fma.c
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_fma.c
    trunk/libc/sysdeps/ieee754/ldbl-128/s_fma.c
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_fma.c
    trunk/libc/sysdeps/ieee754/ldbl-128/s_fmal.c
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_fmal.c
    trunk/libc/sysdeps/ieee754/ldbl-64-128/s_fmal.c
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/ieee754/ldbl-64-128/s_fmal.c
    trunk/libc/sysdeps/ieee754/ldbl-96/s_fma.c
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_fma.c
    trunk/libc/sysdeps/ieee754/ldbl-96/s_fmal.c
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_fmal.c
    trunk/libc/sysdeps/powerpc/fpu/s_fma.S
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/powerpc/fpu/s_fma.S
    trunk/libc/sysdeps/powerpc/fpu/s_fmaf.S
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/powerpc/fpu/s_fmaf.S
    trunk/libc/sysdeps/powerpc/powerpc32/fpu/s_fma.S
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/powerpc/powerpc32/fpu/s_fma.S
    trunk/libc/sysdeps/powerpc/powerpc64/fpu/s_fma.S
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/powerpc/powerpc64/fpu/s_fma.S
    trunk/libc/sysdeps/s390/fpu/s_fma.c
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/s390/fpu/s_fma.c
    trunk/libc/sysdeps/s390/fpu/s_fmaf.c
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/s390/fpu/s_fmaf.c
    trunk/libc/sysdeps/unix/sysv/linux/s390/fpu/s_fma.c
      - copied unchanged from r11842, fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/fpu/s_fma.c
Removed:
    trunk/libc/sysdeps/i386/fpu/s_fma.S
    trunk/libc/sysdeps/i386/fpu/s_fmaf.S
    trunk/libc/sysdeps/i386/fpu/s_fmal.S
Modified:
    trunk/libc/ChangeLog
    trunk/libc/NEWS
    trunk/libc/bits/mathdef.h
    trunk/libc/math/libm-test.inc
    trunk/libc/nptl/ChangeLog
    trunk/libc/nptl/sysdeps/x86_64/pthreaddef.h
    trunk/libc/nptl/sysdeps/x86_64/tls.h
    trunk/libc/sysdeps/i386/bits/mathdef.h
    trunk/libc/sysdeps/i386/fpu/bits/mathinline.h
    trunk/libc/sysdeps/i386/i686/multiarch/s_fma.c
    trunk/libc/sysdeps/ieee754/dbl-64/s_fmaf.c
    trunk/libc/sysdeps/ieee754/ldbl-opt/s_fma.c
    trunk/libc/sysdeps/powerpc/bits/mathdef.h
    trunk/libc/sysdeps/x86_64/bits/mathdef.h
    trunk/libc/sysdeps/x86_64/multiarch/s_fma.c
    trunk/ports/ChangeLog.arm
    trunk/ports/ChangeLog.mips
    trunk/ports/sysdeps/arm/bits/mathdef.h
    trunk/ports/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list
    trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
    trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list

Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Thu Oct 21 17:19:23 2010
@@ -1,3 +1,91 @@
+2010-10-19  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* sysdeps/i386/bits/mathdef.h (FP_FAST_FMA): If the GCC 4.6 port has
+	fast fma builtins, define the macros in the C99 standard.
+	(FP_FAST_FMAF): Likewise.
+	(FP_FAST_FMAL): Likewise.
+	* sysdeps/x86_64/bits/mathdef.h: Likewise.
+
+	* bits/mathdef.h: Update copyright year.
+	* sysdeps/powerpc/bits/mathdef.h: Likewise.
+
+2010-10-19  Michael Meissner  <meissner@xxxxxxxxxxxxxxxxxx>
+
+	* bits/mathdef.h (FP_FAST_FMA): If the GCC 4.6 port has fast fma
+	builtins, define the macros in the C99 standard.
+	(FP_FAST_FMAF): Likewise.
+	(FP_FAST_FMAL): Likewise.
+	* sysdeps/powerpc/bits/mathdef.h (FP_FAST_FMA): Define, ppc as
+	multiply/add.
+	(FP_FAST_FMAF): Likewise.
+
+2010-10-15  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	[BZ #3268]
+	* math/libm-test.inc (fma_test): Some new testcases.
+	* sysdeps/ieee754/ldbl-128/s_fmal.c: New file.
+	* sysdeps/ieee754/ldbl-96/s_fma.c (__fma): Fix fma with finite x and
+	y and infinite z.  Do multiplication by C already in long double.
+	* sysdeps/ieee754/ldbl-96/s_fmal.c: New file.
+	* sysdeps/ieee754/dbl-64/s_fma.c (__fma): Fix fma with finite x and
+	y and infinite z.  Do bitwise or of inexact bit into u.d.
+	* sysdeps/ieee754/ldbl-64-128/s_fmal.c: New file.
+	* sysdeps/i386/fpu/s_fmaf.S: Removed.
+	* sysdeps/i386/fpu/s_fma.S: Removed.
+	* sysdeps/i386/fpu/s_fmal.S: Removed.
+
+2010-10-16  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	[BZ #3268]
+	* math/libm-test.inc (fma_test): Add IEEE quad long double fmal tests.
+	* sysdeps/ieee754/ldbl-128/s_fmal.c (__fmal): Ensure a1 + u.d
+	computation is not scheduled after fetestexcept.  Fix value
+	of minimum denormal long double.
+
+2010-10-14  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	[BZ #3268]
+	* math/libm-test.inc (fma_test): Add some more tests.
+	* sysdeps/ieee754/dbl-64/s_fma.c (__fma): Handle underflows
+	correctly.
+
+2010-10-15  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* scripts/data/localplt-s390-linux-gnu.data: New file.
+	* scripts/data/localplt-s390x-linux-gnu.data: New file.
+
+2010-10-13  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	[BZ #3268]
+	* math/libm-test.inc (fma_test): Some more fmaf and fma tests.
+	* sysdeps/i386/i686/multiarch/s_fma.c: Include ldbl-96 version
+	instead of dbl-64.
+	* sysdeps/i386/fpu/bits/mathinline.h (fma, fmaf, fmal): Remove
+	inlines.
+	* sysdeps/ieee754/ldbl-96/s_fma.c: New file.
+	* sysdeps/ieee754/dbl-64/s_fma.c (__fma): Fix exponent adjustment
+	if one of x and y is very large and the other is subnormal.
+	* sysdeps/s390/fpu/s_fmaf.c: New file.
+	* sysdeps/s390/fpu/s_fma.c: New file.
+	* sysdeps/powerpc/fpu/s_fmaf.S: New file.
+	* sysdeps/powerpc/fpu/s_fma.S: New file.
+	* sysdeps/powerpc/powerpc32/fpu/s_fma.S: New file.
+	* sysdeps/powerpc/powerpc64/fpu/s_fma.S: New file.
+	* sysdeps/unix/sysv/linux/s390/fpu/s_fma.c: New file.
+
+2010-10-12  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	[BZ #3268]
+	* math/libm-test.inc (fma_test): Add some more fmaf tests, add
+	fma tests.
+	* sysdeps/ieee754/dbl-64/s_fmaf.c (__fmaf): Fix Inf/Nan check.
+	* sysdeps/ieee754/dbl-64/s_fma.c: New file.
+	* sysdeps/i386/i686/multiarch/s_fma.c: Include
+	sysdeps/ieee754/dbl-64/s_fma.c instead of math/s_fma.c.
+	* sysdeps/x86_64/multiarch/s_fma.c: Likewise.
+	* sysdeps/ieee754/ldbl-opt/s_fma.c: Likewise.
+	* sysdeps/ieee754/ldbl-128/s_fma.c: New file.
+
 2010-10-12  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	[BZ #12078]

Modified: trunk/libc/NEWS
==============================================================================
--- trunk/libc/NEWS (original)
+++ trunk/libc/NEWS Thu Oct 21 17:19:23 2010
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2010-10-11
+GNU C Library NEWS -- history of user-visible changes.  2010-10-13
 Copyright (C) 1992-2009, 2010 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -10,7 +10,8 @@
 * The following bugs are resolved with this release:
 
   3268, 7066, 10851, 11611, 11640, 11701, 11840, 11856, 11883, 11903, 11904,
-  11968, 11979, 12005, 12037, 12067, 12077, 12078, 12092, 12093, 12107, 12108
+  11968, 11979, 12005, 12037, 12067, 12077, 12078, 12092, 12093, 12107, 12108,
+  12113
 
 * New Linux interfaces: prlimit, prlimit64, fanotify_init, fanotify_mark
 

Modified: trunk/libc/bits/mathdef.h
==============================================================================
--- trunk/libc/bits/mathdef.h (original)
+++ trunk/libc/bits/mathdef.h Thu Oct 21 17:19:23 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,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,6 +34,20 @@
 # define FP_ILOGB0	(-2147483647)
 # define FP_ILOGBNAN	2147483647
 
+/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
+   builtins are supported.  */
+#if __FP_FAST_FMA
+# define FP_FAST_FMA 1
+#endif
+
+#if __FP_FAST_FMAF
+# define FP_FAST_FMAF 1
+#endif
+
+#if __FP_FAST_FMAL
+# define FP_FAST_FMAL 1
+#endif
+
 #endif	/* ISO C99 */
 
 #ifndef __NO_LONG_DOUBLE_MATH

Modified: trunk/libc/math/libm-test.inc
==============================================================================
--- trunk/libc/math/libm-test.inc (original)
+++ trunk/libc/math/libm-test.inc Thu Oct 21 17:19:23 2010
@@ -2800,11 +2800,77 @@
   TEST_fff_f (fma, minus_infty, plus_infty, plus_infty, nan_value, INVALID_EXCEPTION);
   TEST_fff_f (fma, plus_infty, minus_infty, plus_infty, nan_value, INVALID_EXCEPTION);
   TEST_fff_f (fma, minus_infty, minus_infty, minus_infty, nan_value, INVALID_EXCEPTION);
+  TEST_fff_f (fma, plus_infty, 3.5L, minus_infty, nan_value, INVALID_EXCEPTION);
+  TEST_fff_f (fma, minus_infty, -7.5L, minus_infty, nan_value, INVALID_EXCEPTION);
+  TEST_fff_f (fma, -13.5L, plus_infty, plus_infty, nan_value, INVALID_EXCEPTION);
+  TEST_fff_f (fma, minus_infty, 7.5L, plus_infty, nan_value, INVALID_EXCEPTION);
 
   TEST_fff_f (fma, 1.25L, 0.75L, 0.0625L, 1.0L);
-#ifdef TEST_FLOAT
+
+  FLOAT fltmax = CHOOSE (LDBL_MAX, DBL_MAX, FLT_MAX,
+			 LDBL_MAX, DBL_MAX, FLT_MAX);
+  TEST_fff_f (fma, -fltmax, -fltmax, minus_infty, minus_infty);
+  TEST_fff_f (fma, fltmax / 2, fltmax / 2, minus_infty, minus_infty);
+  TEST_fff_f (fma, -fltmax, fltmax, plus_infty, plus_infty);
+  TEST_fff_f (fma, fltmax / 2, -fltmax / 4, plus_infty, plus_infty);
+  TEST_fff_f (fma, plus_infty, 4, plus_infty, plus_infty);
+  TEST_fff_f (fma, 2, minus_infty, minus_infty, minus_infty);
+  TEST_fff_f (fma, minus_infty, minus_infty, plus_infty, plus_infty);
+  TEST_fff_f (fma, plus_infty, minus_infty, minus_infty, minus_infty);
+
+#if defined (TEST_FLOAT) && FLT_MANT_DIG == 24
   TEST_fff_f (fma, 0x1.7ff8p+13, 0x1.000002p+0, 0x1.ffffp-24, 0x1.7ff802p+13);
   TEST_fff_f (fma, 0x1.fffp+0, 0x1.00001p+0, -0x1.fffp+0, 0x1.fffp-20);
+  TEST_fff_f (fma, 0x1.9abcdep+127, 0x0.9abcdep-126, -0x1.f08948p+0, 0x1.bb421p-25);
+  TEST_fff_f (fma, 0x1.9abcdep+100, 0x0.9abcdep-126, -0x1.f08948p-27, 0x1.bb421p-52);
+  TEST_fff_f (fma, 0x1.fffffep+127, 0x1.001p+0, -0x1.fffffep+127, 0x1.fffffep+115);
+  TEST_fff_f (fma, -0x1.fffffep+127, 0x1.fffffep+0, 0x1.fffffep+127, -0x1.fffffap+127);
+  TEST_fff_f (fma, 0x1.fffffep+127, 2.0, -0x1.fffffep+127, 0x1.fffffep+127);
+#endif
+#if defined (TEST_DOUBLE) && DBL_MANT_DIG == 53
+  TEST_fff_f (fma, 0x1.7fp+13, 0x1.0000000000001p+0, 0x1.ffep-48, 0x1.7f00000000001p+13);
+  TEST_fff_f (fma, 0x1.fffp+0, 0x1.0000000000001p+0, -0x1.fffp+0, 0x1.fffp-52);
+  TEST_fff_f (fma, 0x1.0000002p+0, 0x1.ffffffcp-1, 0x1p-300, 1.0);
+  TEST_fff_f (fma, 0x1.0000002p+0, 0x1.ffffffcp-1, -0x1p-300, 0x1.fffffffffffffp-1);
+  TEST_fff_f (fma, 0x1.deadbeef2feedp+1023, 0x0.deadbeef2feedp-1022, -0x1.a05f8c01a4bfbp+1, 0x1.0989687bc9da4p-53);
+  TEST_fff_f (fma, 0x1.deadbeef2feedp+900, 0x0.deadbeef2feedp-1022, -0x1.a05f8c01a4bfbp-122, 0x1.0989687bc9da4p-176);
+  TEST_fff_f (fma, 0x1.fffffffffffffp+1023, 0x1.001p+0, -0x1.fffffffffffffp+1023, 0x1.fffffffffffffp+1011);
+  TEST_fff_f (fma, -0x1.fffffffffffffp+1023, 0x1.fffffffffffffp+0, 0x1.fffffffffffffp+1023, -0x1.ffffffffffffdp+1023);
+  TEST_fff_f (fma, 0x1.fffffffffffffp+1023, 2.0, -0x1.fffffffffffffp+1023, 0x1.fffffffffffffp+1023);
+  TEST_fff_f (fma, 0x1.6a09e667f3bccp-538, 0x1.6a09e667f3bccp-538, 0.0, 0.0);
+  TEST_fff_f (fma, 0x1.deadbeef2feedp-495, 0x1.deadbeef2feedp-495, -0x1.bf86a5786a574p-989, 0x0.0000042625a1fp-1022);
+  TEST_fff_f (fma, 0x1.deadbeef2feedp-503, 0x1.deadbeef2feedp-503, -0x1.bf86a5786a574p-1005, 0x0.0000000004262p-1022);
+  TEST_fff_f (fma, 0x1p-537, 0x1p-538, 0x1p-1074, 0x0.0000000000002p-1022);
+  TEST_fff_f (fma, 0x1.7fffff8p-968, 0x1p-106, 0x0.000001p-1022, 0x0.0000010000001p-1022);
+  TEST_fff_f (fma, 0x1.4000004p-967, 0x1p-106, 0x0.000001p-1022, 0x0.0000010000003p-1022);
+  TEST_fff_f (fma, 0x1.4p-967, -0x1p-106, -0x0.000001p-1022, -0x0.0000010000002p-1022);
+  TEST_fff_f (fma, -0x1.19cab66d73e17p-959, 0x1.c7108a8c5ff51p-107, -0x0.80b0ad65d9b64p-1022, -0x0.80b0ad65d9d59p-1022);
+  TEST_fff_f (fma, -0x1.d2eaed6e8e9d3p-979, -0x1.4e066c62ac9ddp-63, -0x0.9245e6b003454p-1022, -0x0.9245c09c5fb5dp-1022);
+  TEST_fff_f (fma, 0x1.153d650bb9f06p-907, 0x1.2d01230d48407p-125, -0x0.b278d5acfc3cp-1022, -0x0.b22757123bbe9p-1022);
+  TEST_fff_f (fma, -0x1.fffffffffffffp-711, 0x1.fffffffffffffp-275, 0x1.fffffe00007ffp-983, 0x1.7ffffe00007ffp-983);
+#endif
+#if defined (TEST_LDOUBLE) && LDBL_MANT_DIG == 64
+  TEST_fff_f (fma, -0x8.03fcp+3696L, 0xf.fffffffffffffffp-6140L, 0x8.3ffffffffffffffp-2450L, -0x8.01ecp-2440L);
+  TEST_fff_f (fma, 0x9.fcp+2033L, -0x8.000e1f000ff800fp-3613L, -0xf.fffffffffffc0ffp-1579L, -0xd.fc119fb093ed092p-1577L);
+  TEST_fff_f (fma, 0xc.7fc000003ffffffp-1194L, 0x8.1e0003fffffffffp+15327L, -0x8.fffep+14072L, 0xc.ae9f164020effffp+14136L);
+  TEST_fff_f (fma, -0x8.0001fc000000003p+1798L, 0xcp-2230L, 0x8.f7e000000000007p-468L, -0xc.0002f9ffee10404p-429L);
+  TEST_fff_f (fma, 0xc.0000000000007ffp+10130L, -0x8.000000000000001p+4430L, 0xc.07000000001ffffp+14513L, -0xb.fffffffffffd7e4p+14563L);
+  TEST_fff_f (fma, 0xb.ffffp-4777L, 0x8.000000fffffffffp-11612L, -0x0.3800fff8p-16385L, 0x5.c7fe80c7ffeffffp-16385L);
+#endif
+#if defined (TEST_LDOUBLE) && LDBL_MANT_DIG == 113
+  TEST_fff_f (fma, 0x1.bb2de33e02ccbbfa6e245a7c1f71p-2584L, -0x1.6b500daf0580d987f1bc0cadfcddp-13777L, 0x1.613cd91d9fed34b33820e5ab9d8dp-16378L, -0x1.3a79fb50eb9ce887cffa0f09bd9fp-16360L);
+  TEST_fff_f (fma, -0x1.f949b880cacb0f0c61540105321dp-5954L, -0x1.3876cec84b4140f3bd6198731b7ep-10525L, -0x0.a5dc1c6cfbc498c54fb0b504bf19p-16382L, -0x0.a5dc1c6cfbc498c54fb0b5038abbp-16382L);
+  TEST_fff_f (fma, -0x1.0000fffffffffp-16221L, 0x1.0000001fffff8007fep-239L, 0x0.ff87ffffffffffffe000003fffffp-16382L, 0x0.ff87ffffffffffffdffc003bff7fp-16382L);
+  TEST_fff_f (fma, -0x1.ac79c9376ef447f3827c9e9de008p-2228L, -0x1.5ba830022b6139e21fbe7270cad8p-6314L, 0x1.e8282b6a26bb6a9daf5c8e73e9f9p-8616L, 0x1.22f14a0253878a730cd1aee373adp-8541L);
+  TEST_fff_f (fma, -0x1.c69749ec574caaa2ab8e97ddb9f3p+2652L, 0x1.f34235ff9d095449c29b4831b62dp+3311L, 0x1.fbe4302df23354dbd0c4d3cfe606p+5879L, -0x1.bb473bfdfb7a6e18886ce6e57eafp+5964L);
+  TEST_fff_f (fma, -0x1.ca8835fc6ecfb5398625fc891be5p-1686L, 0x1.621e1972bbe2180e5be9dd7d8df5p-7671L, -0x1.7d2d21b73b52cf20dec2a83902a4p-9395L, -0x1.3d2322191c9c88bc68a62ab8042cp-9356L);
+  TEST_fff_f (fma, -0x1.55cff679ec49c2541fab41fc843ep-11819L, 0x1.e60e9f464f9e8df0509647c7c971p+12325L, 0x1.eaa2a7649d765c2f564f7a5beca7p+454L, -0x1.447e29fa7e406a285f4e350fcf86p+507L);
+  TEST_fff_f (fma, 0x1.f0e7b1454908576f2537d863cf9bp+11432L, 0x1.cdce52f09d4ca76e68706f34b5d5p-1417L, -0x1.2e986187c70f146235ea2066e486p+9979L, 0x1.c030dad3cc5643f3dd0f5619f661p+10016L);
+  TEST_fff_f (fma, 0x1.f102f7da4a57a3a4aab620e29452p-3098L, -0x1.cc06a4ff40248f9e2dcc4b6afd84p-11727L, 0x1.d512a11126b5ac8ed8973b8580c8p-14849L, -0x1.be8f1cf737ab4d1c31c54f5ec23bp-14824L);
+  TEST_fff_f (fma, -0x1.fc47ac7434b993cd8dcb2b431f25p-3816L, 0x1.fbc9750da8468852d84558e1db6dp-5773L, -0x1.00a98abf783f75c40fe5b7a37d86p-9607L, -0x1.f81917b166f45e763cfcc057e2adp-9588L);
+  TEST_fff_f (fma, 0x1.00000000000007ffffffffffffffp-9045L, -0x1.ffffffffffff80000001ffffffffp+4773L, -0x1.f8p-4316L, -0x1.00000000000f88000000fffffdffp-4271L);
+  TEST_fff_f (fma, 0x1.4e922764c90701d4a2f21d01893dp-8683L, -0x1.955a12e2d7c9447c27fa022fc865p+212L, -0x1.e9634462eaef96528b90b6944578p-8521L, -0x1.08e1783184a371943d3598e10865p-8470L);
+  TEST_fff_f (fma, 0x1.801181509c03bdbef10d6165588cp-15131L, 0x1.ad86f8e57d3d40bfa8007780af63p-368L, -0x1.6e9df0dab1c9f1d7a6043c390741p-15507L, 0x1.417c9b2b15e2ad57dc9e0e920844p-15498L);
 #endif
 
   END (fma);

Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Thu Oct 21 17:19:23 2010
@@ -1,3 +1,10 @@
+2010-10-13  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	[BZ #12113]
+	* sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
+	* sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
+	of "struct pthread".
+
 2010-09-21  Andreas Schwab  <schwab@xxxxxxxxxx>
 
 	* sysdeps/pthread/pthread.h (pthread_cleanup_push)

Modified: trunk/libc/nptl/sysdeps/x86_64/pthreaddef.h
==============================================================================
--- trunk/libc/nptl/sysdeps/x86_64/pthreaddef.h (original)
+++ trunk/libc/nptl/sysdeps/x86_64/pthreaddef.h Thu Oct 21 17:19:23 2010
@@ -27,8 +27,9 @@
 /* Minimal stack size after allocating thread descriptor and guard size.  */
 #define MINIMAL_REST_STACK	2048
 
-/* Alignment requirement for TCB.  */
-#define TCB_ALIGNMENT		16
+/* Alignment requirement for TCB.  Need to store post-AVX vector registers
+   in the TCB and we want the storage to be aligned at 32-byte.  */
+#define TCB_ALIGNMENT		32
 
 
 /* Location of current stack frame.  The frame pointer is not usable.  */

Modified: trunk/libc/nptl/sysdeps/x86_64/tls.h
==============================================================================
--- trunk/libc/nptl/sysdeps/x86_64/tls.h (original)
+++ trunk/libc/nptl/sysdeps/x86_64/tls.h Thu Oct 21 17:19:23 2010
@@ -117,12 +117,7 @@
 # define TLS_TCB_SIZE sizeof (struct pthread)
 
 /* Alignment requirements for the TCB.  */
-//# define TLS_TCB_ALIGN __alignof__ (struct pthread)
-// Normally the above would be correct  But we have to store post-AVX
-// vector registers in the TCB and we want the storage to be aligned.
-// unfortunately there isn't yet a type for these values and hence no
-// 32-byte alignment requirement.  Make this explicit, for now.
-# define TLS_TCB_ALIGN 32
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
 
 /* The TCB can have any size and the memory following the address the
    thread pointer points to is unspecified.  Allocate the TCB there.  */

Modified: trunk/libc/sysdeps/i386/bits/mathdef.h
==============================================================================
--- trunk/libc/sysdeps/i386/bits/mathdef.h (original)
+++ trunk/libc/sysdeps/i386/bits/mathdef.h Thu Oct 21 17:19:23 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 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
@@ -43,4 +43,18 @@
 # define FP_ILOGB0	(-2147483647 - 1)
 # define FP_ILOGBNAN	(-2147483647 - 1)
 
+/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
+   builtins are supported.  */
+# if __FP_FAST_FMA
+#  define FP_FAST_FMA 1
+# endif
+
+# if __FP_FAST_FMAF
+#  define FP_FAST_FMAF 1
+# endif
+
+# if __FP_FAST_FMAL
+#  define FP_FAST_FMAL 1
+# endif
+
 #endif	/* ISO C99 */

Modified: trunk/libc/sysdeps/i386/fpu/bits/mathinline.h
==============================================================================
--- trunk/libc/sysdeps/i386/fpu/bits/mathinline.h (original)
+++ trunk/libc/sysdeps/i386/fpu/bits/mathinline.h Thu Oct 21 17:19:23 2010
@@ -1,6 +1,6 @@
 /* Inline math functions for i387.
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2003,2004,2006,2007,2009
-   Free Software Foundation, Inc.
+   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2003,2004,2006,2007,2009,
+   2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by John C. Bowman <bowman@xxxxxxxxxxxxxxxx>, 1995.
 
@@ -657,8 +657,6 @@
   __ldexp_code;
 }
 
-__inline_mathcodeNP3 (fma, __x, __y, __z, return (__x * __y) + __z)
-
 __inline_mathopNP (rint, "frndint")
 # endif /* __FAST_MATH__ */
 

Modified: trunk/libc/sysdeps/i386/i686/multiarch/s_fma.c
==============================================================================
--- trunk/libc/sysdeps/i386/i686/multiarch/s_fma.c (original)
+++ trunk/libc/sysdeps/i386/i686/multiarch/s_fma.c Thu Oct 21 17:19:23 2010
@@ -33,4 +33,4 @@
 # define __fma __fma_ia32
 #endif
 
-#include <math/s_fma.c>
+#include <sysdeps/ieee754/ldbl-96/s_fma.c>

Modified: trunk/libc/sysdeps/ieee754/dbl-64/s_fmaf.c
==============================================================================
--- trunk/libc/sysdeps/ieee754/dbl-64/s_fmaf.c (original)
+++ trunk/libc/sysdeps/ieee754/dbl-64/s_fmaf.c Thu Oct 21 17:19:23 2010
@@ -39,7 +39,7 @@
   fesetround (FE_TOWARDZERO);
   /* Perform addition with round to odd.  */
   u.d = temp + (double) z;
-  if ((u.ieee.mantissa1 & 1) == 0 && u.ieee.exponent != 0xff)
+  if ((u.ieee.mantissa1 & 1) == 0 && u.ieee.exponent != 0x7ff)
     u.ieee.mantissa1 |= fetestexcept (FE_INEXACT) != 0;
   feupdateenv (&env);
   /* And finally truncation with round to nearest.  */

Modified: trunk/libc/sysdeps/ieee754/ldbl-opt/s_fma.c
==============================================================================
--- trunk/libc/sysdeps/ieee754/ldbl-opt/s_fma.c (original)
+++ trunk/libc/sysdeps/ieee754/ldbl-opt/s_fma.c Thu Oct 21 17:19:23 2010
@@ -1,5 +1,5 @@
 #include <math_ldbl_opt.h>
-#include <math/s_fma.c>
+#include <sysdeps/ieee754/dbl-64/s_fma.c>
 #if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
 compat_symbol (libm, __fma, fmal, GLIBC_2_1);
 #endif

Modified: trunk/libc/sysdeps/powerpc/bits/mathdef.h
==============================================================================
--- trunk/libc/sysdeps/powerpc/bits/mathdef.h (original)
+++ trunk/libc/sysdeps/powerpc/bits/mathdef.h Thu Oct 21 17:19:23 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,1999,2000,2003,2004,2006
+/* Copyright (C) 1997,1998,1999,2000,2003,2004,2006,2010
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -39,4 +39,8 @@
 # define FP_ILOGB0	(-2147483647)
 # define FP_ILOGBNAN	(2147483647)
 
+/* The powerpc has a combined multiply/add instruction.  */
+# define FP_FAST_FMA 1
+# define FP_FAST_FMAF 1
+
 #endif	/* ISO C99 */

Modified: trunk/libc/sysdeps/x86_64/bits/mathdef.h
==============================================================================
--- trunk/libc/sysdeps/x86_64/bits/mathdef.h (original)
+++ trunk/libc/sysdeps/x86_64/bits/mathdef.h Thu Oct 21 17:19:23 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 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
@@ -45,4 +45,18 @@
 # define FP_ILOGB0	(-2147483647 - 1)
 # define FP_ILOGBNAN	(-2147483647 - 1)
 
+/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
+   builtins are supported.  */
+# if __FP_FAST_FMA
+#  define FP_FAST_FMA 1
+# endif
+
+# if __FP_FAST_FMAF
+#  define FP_FAST_FMAF 1
+# endif
+
+# if __FP_FAST_FMAL
+#  define FP_FAST_FMAL 1
+# endif
+
 #endif	/* ISO C99 */

Modified: trunk/libc/sysdeps/x86_64/multiarch/s_fma.c
==============================================================================
--- trunk/libc/sysdeps/x86_64/multiarch/s_fma.c (original)
+++ trunk/libc/sysdeps/x86_64/multiarch/s_fma.c Thu Oct 21 17:19:23 2010
@@ -1,5 +1,5 @@
 /* FMA version of fma.
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
    Contributed by Intel Corporation.
    This file is part of the GNU C Library.
 
@@ -40,4 +40,4 @@
 # define __fma __fma_sse2
 #endif
 
-#include <math/s_fma.c>
+#include <sysdeps/ieee754/dbl-64/s_fma.c>

Modified: trunk/ports/ChangeLog.arm
==============================================================================
--- trunk/ports/ChangeLog.arm (original)
+++ trunk/ports/ChangeLog.arm Thu Oct 21 17:19:23 2010
@@ -1,3 +1,8 @@
+2010-10-19  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/arm/bits/mathdef.h (FP_FAST_FMA, FP_FAST_FMAF,
+	FP_FAST_FMAL): Define if associated GCC macros are defined.
+
 2010-10-11  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/arm/eabi/feupdateenv.c (feupdateenv): Add

Modified: trunk/ports/ChangeLog.mips
==============================================================================
--- trunk/ports/ChangeLog.mips (original)
+++ trunk/ports/ChangeLog.mips Thu Oct 21 17:19:23 2010
@@ -1,3 +1,10 @@
+2010-10-21  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/mips/mips32/syscalls.list,
+	sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list,
+	sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Add entries
+	for fanotify_mark.
+
 2010-10-11  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Add

Modified: trunk/ports/sysdeps/arm/bits/mathdef.h
==============================================================================
--- trunk/ports/sysdeps/arm/bits/mathdef.h (original)
+++ trunk/ports/sysdeps/arm/bits/mathdef.h Thu Oct 21 17:19:23 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2004, 2006, 2007
+/* Copyright (C) 1999, 2000, 2004, 2006, 2007, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -34,6 +34,20 @@
 # define FP_ILOGB0	(-2147483647)
 # define FP_ILOGBNAN	(2147483647)
 
+/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
+   builtins are supported.  */
+# if __FP_FAST_FMA
+#  define FP_FAST_FMA 1
+# endif
+
+# if __FP_FAST_FMAF
+#  define FP_FAST_FMAF 1
+# endif
+
+# if __FP_FAST_FMAL
+#  define FP_FAST_FMAL 1
+# endif
+
 #endif	/* ISO C99 */
 
 #ifndef __NO_LONG_DOUBLE_MATH

Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list Thu Oct 21 17:19:23 2010
@@ -1,3 +1,5 @@
 # File name	Caller	Syscall name	# args	Strong name	Weak names
 
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
+
+fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark

Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list Thu Oct 21 17:19:23 2010
@@ -6,3 +6,5 @@
 truncate	-	truncate	i:si	truncate	truncate64
 
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
+
+fanotify_mark	EXTRA	fanotify_mark	i:iiiis	fanotify_mark

Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list Thu Oct 21 17:19:23 2010
@@ -1,3 +1,5 @@
 # File name	Caller	Syscall name	# args	Strong name	Weak names
 
 prlimit		EXTRA	prlimit64	i:iipp	prlimit		prlimit64
+
+fanotify_mark	EXTRA	fanotify_mark	i:iiiis	fanotify_mark