This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch master updated. glibc-2.25-61-g2f78098


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  2f78098e39e37699ca58699ec43850b8707cb6c3 (commit)
       via  6ec414025531537bf1bb5d1d9ef9c8dcf43b5789 (commit)
       via  ee6df1e6ab5bf46ff0f71596e8ac46fcb2b790ef (commit)
      from  0b38d66a4e2e0d7cb9f40da5bc6e795e20cf3088 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2f78098e39e37699ca58699ec43850b8707cb6c3

commit 2f78098e39e37699ca58699ec43850b8707cb6c3
Author: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Date:   Tue Feb 21 10:18:18 2017 -0300

    powerpc: Update powerpc-fpu libm-test-ulps
    
    	* sysdeps/powerpc/fpu/libm-test-ulps: Update.

diff --git a/ChangeLog b/ChangeLog
index 3018643..d901efc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-02-21  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
+
+	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
+
 2017-02-21  Wainer dos Santos Moschetta  <wainersm@linux.vnet.ibm.com>
 
 	* sysdeps/powerpc/tst-set_ppr.c: New file.
diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps
index 332741f..11a6607 100644
--- a/sysdeps/powerpc/fpu/libm-test-ulps
+++ b/sysdeps/powerpc/fpu/libm-test-ulps
@@ -252,17 +252,17 @@ ildouble: 1
 ldouble: 1
 
 Function: Imaginary part of "cacos":
-double: 1
+double: 2
 float: 2
-idouble: 1
+idouble: 2
 ifloat: 2
 ildouble: 2
 ldouble: 2
 
 Function: Real part of "cacos_downward":
-double: 2
+double: 3
 float: 2
-idouble: 2
+idouble: 3
 ifloat: 2
 ildouble: 6
 ldouble: 6
@@ -276,12 +276,12 @@ ildouble: 8
 ldouble: 8
 
 Function: Real part of "cacos_towardzero":
-double: 2
+double: 3
 float: 2
-idouble: 2
+idouble: 3
 ifloat: 2
-ildouble: 6
-ldouble: 6
+ildouble: 7
+ldouble: 7
 
 Function: Imaginary part of "cacos_towardzero":
 double: 5
@@ -296,21 +296,21 @@ double: 2
 float: 2
 idouble: 2
 ifloat: 2
-ildouble: 4
-ldouble: 4
+ildouble: 7
+ldouble: 7
 
 Function: Imaginary part of "cacos_upward":
-double: 4
-float: 4
-idouble: 4
-ifloat: 4
-ildouble: 8
-ldouble: 8
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+ildouble: 13
+ldouble: 13
 
 Function: Real part of "cacosh":
-double: 1
+double: 2
 float: 2
-idouble: 1
+idouble: 2
 ifloat: 2
 ildouble: 2
 ldouble: 2
@@ -332,10 +332,10 @@ ildouble: 8
 ldouble: 8
 
 Function: Imaginary part of "cacosh_downward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
 ildouble: 6
 ldouble: 6
 
@@ -348,28 +348,28 @@ ildouble: 8
 ldouble: 8
 
 Function: Imaginary part of "cacosh_towardzero":
-double: 2
+double: 3
 float: 2
-idouble: 2
+idouble: 3
 ifloat: 2
-ildouble: 6
-ldouble: 6
+ildouble: 7
+ldouble: 7
 
 Function: Real part of "cacosh_upward":
 double: 4
 float: 4
 idouble: 4
 ifloat: 4
-ildouble: 8
-ldouble: 8
+ildouble: 12
+ldouble: 12
 
 Function: Imaginary part of "cacosh_upward":
-double: 2
+double: 3
 float: 2
-idouble: 2
+idouble: 3
 ifloat: 2
-ildouble: 4
-ldouble: 4
+ildouble: 8
+ldouble: 8
 
 Function: "carg":
 double: 1
@@ -412,20 +412,20 @@ ildouble: 1
 ldouble: 1
 
 Function: Imaginary part of "casin":
-double: 1
+double: 2
 float: 2
-idouble: 1
+idouble: 2
 ifloat: 2
 ildouble: 2
 ldouble: 2
 
 Function: Real part of "casin_downward":
 double: 3
-float: 1
+float: 2
 idouble: 3
-ifloat: 1
-ildouble: 3
-ldouble: 3
+ifloat: 2
+ildouble: 4
+ldouble: 4
 
 Function: Imaginary part of "casin_downward":
 double: 5
@@ -452,25 +452,25 @@ ildouble: 8
 ldouble: 8
 
 Function: Real part of "casin_upward":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
 ildouble: 6
 ldouble: 6
 
 Function: Imaginary part of "casin_upward":
-double: 4
-float: 4
-idouble: 4
-ifloat: 4
-ildouble: 8
-ldouble: 8
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+ildouble: 13
+ldouble: 13
 
 Function: Real part of "casinh":
-double: 1
+double: 2
 float: 2
-idouble: 1
+idouble: 2
 ifloat: 2
 ildouble: 2
 ldouble: 2
@@ -493,11 +493,11 @@ ldouble: 8
 
 Function: Imaginary part of "casinh_downward":
 double: 3
-float: 1
+float: 2
 idouble: 3
-ifloat: 1
-ildouble: 3
-ldouble: 3
+ifloat: 2
+ildouble: 4
+ldouble: 4
 
 Function: Real part of "casinh_towardzero":
 double: 5
@@ -516,72 +516,76 @@ ildouble: 5
 ldouble: 5
 
 Function: Real part of "casinh_upward":
-double: 4
-float: 4
-idouble: 4
-ifloat: 4
-ildouble: 8
-ldouble: 8
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+ildouble: 13
+ldouble: 13
 
 Function: Imaginary part of "casinh_upward":
-double: 2
+double: 3
 float: 2
-idouble: 2
+idouble: 3
 ifloat: 2
 ildouble: 6
 ldouble: 6
 
 Function: Real part of "catan":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 3
+ldouble: 3
 
 Function: Imaginary part of "catan":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
 
 Function: Real part of "catan_downward":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
-ildouble: 5
-ldouble: 5
+ifloat: 2
+ildouble: 6
+ldouble: 6
 
 Function: Imaginary part of "catan_downward":
 double: 2
 float: 2
 idouble: 2
 ifloat: 2
-ildouble: 6
-ldouble: 6
+ildouble: 7
+ldouble: 7
 
 Function: Real part of "catan_towardzero":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
-ildouble: 6
-ldouble: 6
+ifloat: 2
+ildouble: 7
+ldouble: 7
 
 Function: Imaginary part of "catan_towardzero":
 double: 2
-float: 1
+float: 2
 idouble: 2
-ifloat: 1
-ildouble: 2
-ldouble: 2
+ifloat: 2
+ildouble: 3
+ldouble: 3
 
 Function: Real part of "catan_upward":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
-ildouble: 3
-ldouble: 3
+ildouble: 6
+ldouble: 6
 
 Function: Imaginary part of "catan_upward":
 double: 3
@@ -596,14 +600,16 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
 
 Function: Imaginary part of "catanh":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 3
+ldouble: 3
 
 Function: Real part of "catanh_downward":
 double: 2
@@ -618,38 +624,40 @@ double: 1
 float: 2
 idouble: 1
 ifloat: 2
-ildouble: 5
-ldouble: 5
+ildouble: 6
+ldouble: 6
 
 Function: Real part of "catanh_towardzero":
 double: 2
-float: 1
+float: 2
 idouble: 2
-ifloat: 1
-ildouble: 2
-ldouble: 2
+ifloat: 2
+ildouble: 3
+ldouble: 3
 
 Function: Imaginary part of "catanh_towardzero":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
-ildouble: 6
-ldouble: 6
+ildouble: 7
+ldouble: 7
 
 Function: Real part of "catanh_upward":
 double: 4
-float: 3
+float: 4
 idouble: 4
-ifloat: 3
+ifloat: 4
 ildouble: 8
 ldouble: 8
 
 Function: Imaginary part of "catanh_upward":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
-ildouble: 3
-ldouble: 3
+ildouble: 6
+ldouble: 6
 
 Function: "cbrt":
 double: 3

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ec414025531537bf1bb5d1d9ef9c8dcf43b5789

commit 6ec414025531537bf1bb5d1d9ef9c8dcf43b5789
Author: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
Date:   Tue Feb 21 10:17:32 2017 -0300

    powerpc: Add tests for __ppc_set_ppr_* functions.
    
    The sys/platform/ppc.h header defines a class of __ppc_set_ppr functions
    used to set the Program Priority Register (PPR) in PowerPC.
    This patch implements test cases for these functions.
    
    Tested on ppc64le, ppc64, and ppc.
    
    	* sysdeps/powerpc/tst-set_ppr.c: New file.
    	Implement test cases for __ppc_set_ppr_* functions.
    	* sysdeps/powerpc/Makefile ($(subdir),misc): Add tst-set_ppr
    	in the list of tests.

diff --git a/ChangeLog b/ChangeLog
index be4291b..3018643 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2017-02-21  Wainer dos Santos Moschetta  <wainersm@linux.vnet.ibm.com>
 
+	* sysdeps/powerpc/tst-set_ppr.c: New file.
+	Implement test cases for __ppc_set_ppr_* functions.
+	* sysdeps/powerpc/Makefile ($(subdir),misc): Add tst-set_ppr
+	in the list of tests.
+
+2017-02-21  Wainer dos Santos Moschetta  <wainersm@linux.vnet.ibm.com>
+
 	* sysdeps/powerpc/test-get_hwcap.c: Use <support/test-driver.c>
 	instead of test-skeleton.c.
 	(do_test): Replaced pthread_create and pthread_join with
diff --git a/sysdeps/powerpc/Makefile b/sysdeps/powerpc/Makefile
index 099fbf6..933810f 100644
--- a/sysdeps/powerpc/Makefile
+++ b/sysdeps/powerpc/Makefile
@@ -34,6 +34,7 @@ endif
 ifeq ($(subdir),misc)
 sysdep_headers += sys/platform/ppc.h
 tests += test-gettimebase
+tests += tst-set_ppr
 endif
 
 ifneq (,$(filter %le,$(config-machine)))
diff --git a/sysdeps/powerpc/tst-set_ppr.c b/sysdeps/powerpc/tst-set_ppr.c
new file mode 100644
index 0000000..77901b5
--- /dev/null
+++ b/sysdeps/powerpc/tst-set_ppr.c
@@ -0,0 +1,103 @@
+/* Test the implementation of __ppc_set_ppr_* functions.
+   Copyright (C) 2017 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <dl-procinfo.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <sys/auxv.h>
+
+#include <sys/platform/ppc.h>
+
+#include <support/test-driver.h>
+
+#ifdef __powerpc64__
+  typedef uint64_t ppr_t;
+# define MFPPR "mfppr"
+  /* The thread priority value is obtained from bits 11:13.  */
+# define EXTRACT_THREAD_PRIORITY(x) ((x >> 50) & 7)
+#else
+  typedef uint32_t ppr_t;
+# define MFPPR "mfppr32"
+  /* For 32-bit, the upper 32 bits of the Program Priority Register (PPR)
+     are used, so the thread priority value is obtained from bits 43:46.  */
+# define EXTRACT_THREAD_PRIORITY(x) ((x >> 18) & 7)
+#endif /* !__powerpc64__ */
+
+/* Read the thread priority value set in the PPR.  */
+static __inline__ ppr_t
+get_thread_priority (void)
+{
+  /* Read the PPR.  */
+  ppr_t ppr;
+  asm volatile (MFPPR" %0" : "=r"(ppr));
+  /* Return the thread priority value.  */
+  return EXTRACT_THREAD_PRIORITY (ppr);
+}
+
+/* Check the thread priority bits of PPR are set as expected. */
+uint8_t
+check_thread_priority (uint8_t expected)
+{
+  ppr_t actual = get_thread_priority ();
+
+  if (actual != expected)
+    {
+      printf ("FAIL: Expected %"PRIu8" got %"PRIuMAX".\n", expected,
+	      (uintmax_t) actual);
+      return 1;
+    }
+  printf ("PASS: Thread priority set to %"PRIu8" correctly.\n", expected);
+  return 0;
+}
+
+/* The Power ISA 2.06 allows the following thread priorities for any
+   problem state program: low (2), medium low (3), and medium (4).
+   Power ISA 2.07b added very low (1).
+   Check whether the values set by __ppc_set_ppr_* are correct.  */
+static int
+do_test (void)
+{
+  /* Check for the minimum required Power ISA to run these tests.  */
+  if ((getauxval (AT_HWCAP) & PPC_FEATURE_ARCH_2_06) == 0)
+    {
+      printf ("Requires an environment that implements the Power ISA version"
+              " 2.06 or greater.\n");
+      return EXIT_UNSUPPORTED;
+    }
+
+  uint8_t rc = 0;
+
+#ifdef _ARCH_PWR8
+  __ppc_set_ppr_very_low ();
+  rc |= check_thread_priority (1);
+#endif /* _ARCH_PWR8 */
+
+  __ppc_set_ppr_low ();
+  rc |= check_thread_priority (2);
+
+  __ppc_set_ppr_med_low ();
+  rc |= check_thread_priority (3);
+
+  __ppc_set_ppr_med ();
+  rc |= check_thread_priority (4);
+
+  return rc;
+}
+
+#include <support/test-driver.c>

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ee6df1e6ab5bf46ff0f71596e8ac46fcb2b790ef

commit ee6df1e6ab5bf46ff0f71596e8ac46fcb2b790ef
Author: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
Date:   Tue Feb 21 10:16:49 2017 -0300

    powerpc: Convert tests to the new support test-driver
    
    Change the powerpc tests to use <support/test-driver.c>.
    Also replace some of pthread calls to its xpthread equivalent.
    
    Tested on ppc64le.
    
    	* sysdeps/powerpc/test-get_hwcap.c: Use <support/test-driver.c>
    	instead of test-skeleton.c.
    	(do_test): Replaced pthread_create and pthread_join with
    	xpthread_create and xpthread_join.  Use TEST_VERIFY_EXIT macro.
    	Removed unneeded status variable.
    	* sysdeps/powerpc/test-gettimebase.c: Use <support/test-driver.c>
    	instead of test-skeleton.c.
    	* sysdeps/powerpc/tst-tlsopt-powerpc.c: Likewise.

diff --git a/ChangeLog b/ChangeLog
index cfc9ff4..be4291b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-02-21  Wainer dos Santos Moschetta  <wainersm@linux.vnet.ibm.com>
+
+	* sysdeps/powerpc/test-get_hwcap.c: Use <support/test-driver.c>
+	instead of test-skeleton.c.
+	(do_test): Replaced pthread_create and pthread_join with
+	xpthread_create and xpthread_join.  Use TEST_VERIFY_EXIT macro.
+	Removed unneeded status variable.
+	* sysdeps/powerpc/test-gettimebase.c: Use <support/test-driver.c>
+	instead of test-skeleton.c.
+	* sysdeps/powerpc/tst-tlsopt-powerpc.c: Likewise.
+
 2017-02-20  Mike FABIAN  <mfabian@redhat.com>
 
 	[BZ #20313]
diff --git a/sysdeps/powerpc/test-get_hwcap.c b/sysdeps/powerpc/test-get_hwcap.c
index f32ad63..d776310 100644
--- a/sysdeps/powerpc/test-get_hwcap.c
+++ b/sysdeps/powerpc/test-get_hwcap.c
@@ -23,6 +23,9 @@
 #include <stdint.h>
 #include <pthread.h>
 
+#include <support/check.h>
+#include <support/xthread.h>
+
 #include <sys/auxv.h>
 
 #include <dl-procinfo.h>
@@ -148,7 +151,6 @@ do_test (void)
   pthread_attr_t attr;
   pthread_attr_init (&attr);
   pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_JOINABLE);
-  void *status;
 
   long i = 0;
 
@@ -160,22 +162,10 @@ do_test (void)
 
   /* Check for other thread.  */
   i++;
-  if (pthread_create (&threads[i], &attr, t1, (void *)i))
-    {
-      printf ("FAIL: error creating thread %ld.\n", i);
-      return 1;
-    }
+  threads[i] = xpthread_create (&attr, t1, (void *)i);
 
   pthread_attr_destroy (&attr);
-  if (pthread_join (threads[i], &status))
-    {
-      printf ("FAIL: error joining thread %ld.\n", i);
-      return 1;
-    }
-  if (status)
-    {
-      return 1;
-    }
+  TEST_VERIFY_EXIT (xpthread_join (threads[i]) == NULL);
 
   printf("PASS: HWCAP, HWCAP2 and AT_PLATFORM are correctly set in the TCB for"
 	 " all threads.\n");
@@ -184,5 +174,4 @@ do_test (void)
 
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
diff --git a/sysdeps/powerpc/test-gettimebase.c b/sysdeps/powerpc/test-gettimebase.c
index 555f146..0e8e2f0 100644
--- a/sysdeps/powerpc/test-gettimebase.c
+++ b/sysdeps/powerpc/test-gettimebase.c
@@ -43,5 +43,4 @@ do_test (void)
   return 1;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
diff --git a/sysdeps/powerpc/tst-tlsopt-powerpc.c b/sysdeps/powerpc/tst-tlsopt-powerpc.c
index c9a14cb..8ae928a 100644
--- a/sysdeps/powerpc/tst-tlsopt-powerpc.c
+++ b/sysdeps/powerpc/tst-tlsopt-powerpc.c
@@ -8,7 +8,6 @@
 COMMON_INT_DEF(foo);
 
 
-#define TEST_FUNCTION do_test ()
 static int
 do_test (void)
 {
@@ -49,4 +48,4 @@ do_test (void)
   return result;
 }
 
-#include "../../test-skeleton.c"
+#include <support/test-driver.c>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                            |   22 ++++
 sysdeps/powerpc/Makefile             |    1 +
 sysdeps/powerpc/fpu/libm-test-ulps   |  204 ++++++++++++++++++----------------
 sysdeps/powerpc/test-get_hwcap.c     |   23 +---
 sysdeps/powerpc/test-gettimebase.c   |    3 +-
 sysdeps/powerpc/tst-set_ppr.c        |  103 +++++++++++++++++
 sysdeps/powerpc/tst-tlsopt-powerpc.c |    3 +-
 7 files changed, 240 insertions(+), 119 deletions(-)
 create mode 100644 sysdeps/powerpc/tst-set_ppr.c


hooks/post-receive
-- 
GNU C Library master sources


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