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.21-281-g8666ab5


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  8666ab5c42b0959129f3c37950eef5db2e5f0fea (commit)
       via  f7fba80508eb370db54fb32f6ffc691468ebec3f (commit)
      from  92f2897953ab6cd9e073718cfe36611700e174c6 (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=8666ab5c42b0959129f3c37950eef5db2e5f0fea

commit 8666ab5c42b0959129f3c37950eef5db2e5f0fea
Author: Stefan Liebler <stli@linux.vnet.ibm.com>
Date:   Fri Apr 24 13:36:23 2015 +0200

    S/390: Regenerate ULPs

diff --git a/ChangeLog b/ChangeLog
index f5aeede..97fb9fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-04-24  Stefan Liebler  <stli@linux.vnet.ibm.com>
 
+	* sysdeps/s390/fpu/libm-test-upls: Regenerate.
+
+2015-04-24  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
 	* NEWS: Mention sysconf() cache information support for s390.
 	* sysdeps/unix/sysv/linux/s390/sysconf.c: New File.
 
diff --git a/sysdeps/s390/fpu/libm-test-ulps b/sysdeps/s390/fpu/libm-test-ulps
index 81fc1b1..7914dca 100644
--- a/sysdeps/s390/fpu/libm-test-ulps
+++ b/sysdeps/s390/fpu/libm-test-ulps
@@ -1,6 +1,10 @@
 # Begin of automatic generation
 
 # Maximal error of functions:
+Function: "acos":
+float: 1
+ifloat: 1
+
 Function: "acos_downward":
 float: 1
 ifloat: 1
@@ -8,14 +12,20 @@ ildouble: 1
 ldouble: 1
 
 Function: "acos_towardzero":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1
 
 Function: "acos_upward":
 double: 1
+float: 1
 idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: "acosh":
 double: 1
@@ -30,8 +40,8 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
 
 Function: "acosh_towardzero":
 double: 1
@@ -46,10 +56,12 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
 
 Function: "asin":
+float: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 
@@ -61,14 +73,8 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
-Function: "asin_tonearest":
-ildouble: 1
-ldouble: 1
-
 Function: "asin_towardzero":
-double: 1
 float: 1
-idouble: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1
@@ -78,8 +84,8 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 2
-ldouble: 2
+ildouble: 1
+ldouble: 1
 
 Function: "asinh":
 double: 1
@@ -90,12 +96,12 @@ ildouble: 1
 ldouble: 1
 
 Function: "asinh_downward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
-ildouble: 2
-ldouble: 2
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+ildouble: 3
+ldouble: 3
 
 Function: "asinh_towardzero":
 double: 2
@@ -106,16 +112,20 @@ ildouble: 2
 ldouble: 2
 
 Function: "asinh_upward":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-ildouble: 2
-ldouble: 2
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+ildouble: 3
+ldouble: 3
 
 Function: "atan":
 double: 1
+float: 1
 idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: "atan2":
 float: 1
@@ -152,8 +162,8 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
 
 Function: "atan_towardzero":
 double: 1
@@ -165,9 +175,9 @@ ldouble: 1
 
 Function: "atan_upward":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
+ifloat: 2
 ildouble: 1
 ldouble: 1
 
@@ -176,32 +186,48 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
 
 Function: "atanh_downward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
+Function: "atanh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: "atanh_upward":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+ildouble: 3
+ldouble: 3
+
+Function: "cabs":
 double: 1
-float: 1
 idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
 
-Function: "atanh_towardzero":
+Function: "cabs_downward":
 double: 1
-float: 1
 idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
 
-Function: "atanh_upward":
+Function: "cabs_towardzero":
+double: 1
+idouble: 1
+
+Function: "cabs_upward":
 double: 1
-float: 1
 idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
 
 Function: Real part of "cacos":
 double: 1
@@ -220,9 +246,9 @@ ildouble: 2
 ldouble: 2
 
 Function: Real part of "cacos_downward":
-double: 1
+double: 2
 float: 2
-idouble: 1
+idouble: 2
 ifloat: 2
 ildouble: 2
 ldouble: 2
@@ -236,9 +262,9 @@ ildouble: 5
 ldouble: 5
 
 Function: Real part of "cacos_towardzero":
-double: 1
+double: 2
 float: 2
-idouble: 1
+idouble: 2
 ifloat: 2
 ildouble: 2
 ldouble: 2
@@ -292,9 +318,9 @@ ildouble: 5
 ldouble: 5
 
 Function: Imaginary part of "cacosh_downward":
-double: 1
+double: 2
 float: 2
-idouble: 1
+idouble: 2
 ifloat: 2
 ildouble: 2
 ldouble: 2
@@ -308,9 +334,9 @@ ildouble: 5
 ldouble: 5
 
 Function: Imaginary part of "cacosh_towardzero":
-double: 1
+double: 2
 float: 2
-idouble: 1
+idouble: 2
 ifloat: 2
 ildouble: 2
 ldouble: 2
@@ -331,6 +357,12 @@ ifloat: 2
 ildouble: 3
 ldouble: 3
 
+Function: "carg":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
 Function: "carg_downward":
 double: 1
 float: 1
@@ -340,8 +372,12 @@ ildouble: 1
 ldouble: 1
 
 Function: "carg_towardzero":
-float: 1
-ifloat: 1
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 2
+ldouble: 2
 
 Function: "carg_upward":
 double: 1
@@ -368,9 +404,9 @@ ildouble: 2
 ldouble: 2
 
 Function: Real part of "casin_downward":
-double: 4
+double: 3
 float: 1
-idouble: 4
+idouble: 3
 ifloat: 1
 ildouble: 3
 ldouble: 3
@@ -384,9 +420,9 @@ ildouble: 5
 ldouble: 5
 
 Function: Real part of "casin_towardzero":
-double: 4
+double: 3
 float: 1
-idouble: 4
+idouble: 3
 ifloat: 1
 ildouble: 3
 ldouble: 3
@@ -440,9 +476,9 @@ ildouble: 5
 ldouble: 5
 
 Function: Imaginary part of "casinh_downward":
-double: 4
+double: 3
 float: 1
-idouble: 4
+idouble: 3
 ifloat: 1
 ildouble: 3
 ldouble: 3
@@ -456,9 +492,9 @@ ildouble: 5
 ldouble: 5
 
 Function: Imaginary part of "casinh_towardzero":
-double: 4
+double: 3
 float: 1
-idouble: 4
+idouble: 3
 ifloat: 1
 ildouble: 3
 ldouble: 3
@@ -526,9 +562,7 @@ ildouble: 3
 ldouble: 3
 
 Function: Real part of "catan_upward":
-double: 1
 float: 1
-idouble: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1
@@ -596,39 +630,39 @@ ildouble: 4
 ldouble: 4
 
 Function: Imaginary part of "catanh_upward":
-double: 1
 float: 1
-idouble: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1
 
 Function: "cbrt":
-double: 1
+double: 3
 float: 1
-idouble: 1
+idouble: 3
 ifloat: 1
 ildouble: 1
 ldouble: 1
 
 Function: "cbrt_downward":
-double: 2
+double: 4
 float: 1
-idouble: 2
+idouble: 4
 ifloat: 1
 ildouble: 1
 ldouble: 1
 
 Function: "cbrt_towardzero":
 double: 2
+float: 1
 idouble: 2
+ifloat: 1
 ildouble: 1
 ldouble: 1
 
 Function: "cbrt_upward":
-double: 2
+double: 4
 float: 1
-idouble: 2
+idouble: 4
 ifloat: 1
 ildouble: 1
 ldouble: 1
@@ -778,12 +812,12 @@ ildouble: 1
 ldouble: 1
 
 Function: Real part of "clog":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
 
 Function: Imaginary part of "clog":
 double: 1
@@ -794,76 +828,76 @@ ildouble: 1
 ldouble: 1
 
 Function: Real part of "clog10":
-double: 2
+double: 3
 float: 2
-idouble: 2
+idouble: 3
 ifloat: 2
 ildouble: 2
 ldouble: 2
 
 Function: Imaginary part of "clog10":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
+ifloat: 2
 ildouble: 2
 ldouble: 2
 
 Function: Real part of "clog10_downward":
-double: 3
+double: 6
+float: 5
+idouble: 6
+ifloat: 5
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "clog10_downward":
+double: 2
 float: 3
-idouble: 3
+idouble: 2
 ifloat: 3
 ildouble: 3
 ldouble: 3
 
-Function: Imaginary part of "clog10_downward":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
-ildouble: 2
-ldouble: 2
-
 Function: Real part of "clog10_towardzero":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
-ildouble: 2
-ldouble: 2
-
-Function: Imaginary part of "clog10_towardzero":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
-ildouble: 2
-ldouble: 2
-
-Function: Real part of "clog10_upward":
 double: 4
 float: 3
 idouble: 4
 ifloat: 3
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "clog10_towardzero":
+double: 2
+float: 4
+idouble: 2
+ifloat: 4
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "clog10_upward":
+double: 6
+float: 5
+idouble: 6
+ifloat: 5
 ildouble: 4
 ldouble: 4
 
 Function: Imaginary part of "clog10_upward":
 double: 2
-float: 2
+float: 3
 idouble: 2
-ifloat: 2
+ifloat: 3
 ildouble: 3
 ldouble: 3
 
 Function: Real part of "clog_downward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
-ildouble: 2
-ldouble: 2
+double: 4
+float: 5
+idouble: 4
+ifloat: 5
+ildouble: 5
+ldouble: 5
 
 Function: Imaginary part of "clog_downward":
 double: 1
@@ -874,12 +908,12 @@ ildouble: 2
 ldouble: 2
 
 Function: Real part of "clog_towardzero":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
-ildouble: 2
-ldouble: 2
+double: 4
+float: 5
+idouble: 4
+ifloat: 5
+ildouble: 5
+ldouble: 5
 
 Function: Imaginary part of "clog_towardzero":
 double: 1
@@ -890,18 +924,18 @@ ildouble: 2
 ldouble: 2
 
 Function: Real part of "clog_upward":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-ildouble: 2
-ldouble: 2
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+ildouble: 4
+ldouble: 4
 
 Function: Imaginary part of "clog_upward":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
 ildouble: 2
 ldouble: 2
 
@@ -919,12 +953,6 @@ ifloat: 2
 ildouble: 2
 ldouble: 2
 
-Function: "cos_tonearest":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-
 Function: "cos_towardzero":
 double: 1
 float: 1
@@ -957,14 +985,6 @@ ifloat: 1
 ildouble: 1
 ldouble: 2
 
-Function: "cosh_tonearest":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-
 Function: "cosh_towardzero":
 double: 1
 float: 1
@@ -1004,9 +1024,9 @@ ildouble: 6
 ldouble: 6
 
 Function: Imaginary part of "cpow_downward":
-double: 2
+double: 1
 float: 2
-idouble: 2
+idouble: 1
 ifloat: 2
 ildouble: 2
 ldouble: 2
@@ -1020,9 +1040,9 @@ ildouble: 6
 ldouble: 6
 
 Function: Imaginary part of "cpow_towardzero":
-double: 2
+double: 1
 float: 2
-idouble: 2
+idouble: 1
 ifloat: 2
 ildouble: 2
 ldouble: 2
@@ -1261,22 +1281,6 @@ ifloat: 1
 ildouble: 5
 ldouble: 5
 
-Function: Real part of "ctan_tonearest":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 3
-ldouble: 3
-
-Function: Imaginary part of "ctan_tonearest":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-ildouble: 3
-ldouble: 3
-
 Function: Real part of "ctan_towardzero":
 double: 5
 float: 3
@@ -1341,22 +1345,6 @@ ifloat: 5
 ildouble: 4
 ldouble: 4
 
-Function: Real part of "ctanh_tonearest":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
-ildouble: 3
-ldouble: 3
-
-Function: Imaginary part of "ctanh_tonearest":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-ildouble: 3
-ldouble: 3
-
 Function: Real part of "ctanh_towardzero":
 double: 2
 float: 2
@@ -1457,12 +1445,6 @@ ifloat: 1
 ildouble: 2
 ldouble: 2
 
-Function: "exp10_tonearest":
-double: 1
-idouble: 1
-ildouble: 1
-ldouble: 1
-
 Function: "exp10_towardzero":
 double: 1
 float: 1
@@ -1508,32 +1490,24 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
-
-Function: "expm1_tonearest":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
 
 Function: "expm1_towardzero":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 3
+ldouble: 3
 
 Function: "expm1_upward":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 3
+ldouble: 3
 
 Function: "gamma":
 double: 1
@@ -1762,29 +1736,33 @@ idouble: 1
 ifloat: 1
 
 Function: "log2":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 
 Function: "log2_downward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
 ildouble: 1
 ldouble: 1
 
 Function: "log2_towardzero":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
+ifloat: 2
 ildouble: 1
 ldouble: 1
 
 Function: "log2_upward":
-double: 2
+double: 3
 float: 2
-idouble: 2
+idouble: 3
 ifloat: 2
 ildouble: 1
 ldouble: 1
@@ -1845,12 +1823,6 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
-Function: "pow_tonearest":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-
 Function: "pow_towardzero":
 double: 1
 float: 1
@@ -1881,12 +1853,6 @@ ifloat: 2
 ildouble: 1
 ldouble: 1
 
-Function: "sin_tonearest":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-
 Function: "sin_towardzero":
 double: 1
 float: 1
@@ -1900,8 +1866,8 @@ double: 1
 float: 2
 idouble: 1
 ifloat: 2
-ildouble: 3
-ldouble: 3
+ildouble: 2
+ldouble: 2
 
 Function: "sincos":
 float: 1
@@ -1933,29 +1899,37 @@ ifloat: 1
 ildouble: 2
 ldouble: 2
 
-Function: "sinh_downward":
+Function: "sinh":
 double: 1
+float: 1
 idouble: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: "sinh_downward":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+ildouble: 2
+ldouble: 2
+
 Function: "sinh_towardzero":
-double: 1
-idouble: 1
-ildouble: 1
-ldouble: 1
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
 
 Function: "sinh_upward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-
-Function: "tan":
-ildouble: 1
-ldouble: 1
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+ildouble: 2
+ldouble: 2
 
 Function: "tan_downward":
 double: 1
@@ -1965,10 +1939,6 @@ ifloat: 2
 ildouble: 1
 ldouble: 1
 
-Function: "tan_tonearest":
-ildouble: 1
-ldouble: 1
-
 Function: "tan_towardzero":
 double: 1
 float: 1
@@ -1982,8 +1952,8 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 2
-ldouble: 2
+ildouble: 1
+ldouble: 1
 
 Function: "tanh":
 ildouble: 1
@@ -2063,25 +2033,25 @@ ldouble: 2
 
 Function: "y1_downward":
 double: 3
-float: 6
+float: 2
 idouble: 3
-ifloat: 6
+ifloat: 2
 ildouble: 4
 ldouble: 4
 
 Function: "y1_towardzero":
 double: 3
-float: 3
+float: 2
 idouble: 3
-ifloat: 3
+ifloat: 2
 ildouble: 2
 ldouble: 2
 
 Function: "y1_upward":
 double: 5
-float: 8
+float: 2
 idouble: 5
-ifloat: 8
+ifloat: 2
 ildouble: 5
 ldouble: 5
 

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

commit f7fba80508eb370db54fb32f6ffc691468ebec3f
Author: Stefan Liebler <stli@linux.vnet.ibm.com>
Date:   Fri Apr 24 13:34:17 2015 +0200

    S/390: Get cache information via sysconf
    
    This patch adds support to query cache information on s390
    via sysconf() function - e.g. with _SC_LEVEL1_ICACHE_SIZE.
    The attributes size, linesize and assoc can be queried
    for cache level 1 - 4 via "extract cpu attribute" instruction,
    which was first available with z10.
    
    * NEWS: Mention sysconf() cache information support for s390.
    * sysdeps/unix/sysv/linux/s390/sysconf.c: New File.

diff --git a/ChangeLog b/ChangeLog
index 2c01eac..f5aeede 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-24  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+	* NEWS: Mention sysconf() cache information support for s390.
+	* sysdeps/unix/sysv/linux/s390/sysconf.c: New File.
+
 2015-04-22  Wilco Dijkstra  <wdijkstr@arm.com>
 
 	* math/k_casinh.c (__kernel_casinh): Use __copysign.
diff --git a/NEWS b/NEWS
index ccc4d13..a628b5a 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,9 @@ Version 2.22
   18080, 18093, 18100, 18104, 18110, 18111, 18128, 18138, 18185, 18197,
   18206, 18210, 18211, 18247, 18287.
 
+* Cache information can be queried via sysconf() function on s390 e.g. with
+  _SC_LEVEL1_ICACHE_SIZE as argument.
+
 * A buffer overflow in gethostbyname_r and related functions performing DNS
   requests has been fixed.  If the NSS functions were called with a
   misaligned buffer, the buffer length change due to pointer alignment was
diff --git a/sysdeps/unix/sysv/linux/s390/sysconf.c b/sysdeps/unix/sysv/linux/s390/sysconf.c
new file mode 100644
index 0000000..7d61c50
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/s390/sysconf.c
@@ -0,0 +1,230 @@
+/* Get system parameters, e.g. cache information.  S390/S390x version.
+   Copyright (C) 2015 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 <unistd.h>
+#include <dl-procinfo.h>
+
+static long int linux_sysconf (int name);
+
+/* Possible arguments for get_cache_info.
+   The values are reflecting the level/attribute/type indications
+   of ecag-instruction (extract cpu attribue).  */
+#define CACHE_LEVEL_MAX        8
+#define CACHE_ATTR_LINESIZE    1
+#define CACHE_ATTR_SIZE        2
+#define CACHE_ATTR_ASSOC       3
+#define CACHE_TYPE_DATA        0
+#define CACHE_TYPE_INSTRUCTION 1
+
+static long
+get_cache_info (int level, int attr, int type)
+{
+  unsigned long int val;
+  unsigned int cmd;
+  unsigned long int arg;
+
+  /* Check arguments.  */
+  if (level < 1 || level > CACHE_LEVEL_MAX
+      || attr < CACHE_ATTR_LINESIZE || attr > CACHE_ATTR_ASSOC
+      || type < CACHE_TYPE_DATA || type > CACHE_TYPE_INSTRUCTION)
+    return 0L;
+
+  /* Check if ecag-instruction is available.
+     ecag - extract CPU attribute (only in zarch; arch >= z10; in as 2.24)  */
+  if (!(GLRO (dl_hwcap) & HWCAP_S390_STFLE)
+#if !defined __s390x__
+      || !(GLRO (dl_hwcap) & HWCAP_S390_ZARCH)
+      || !(GLRO (dl_hwcap) & HWCAP_S390_HIGH_GPRS)
+#endif /* !__s390x__ */
+      )
+    {
+      /* stfle (or zarch, high-gprs on s390-32) is not available.
+	 We are on an old machine. Return 256byte for LINESIZE for L1 d/i-cache,
+         otherwise 0.  */
+      if (level == 1 && attr == CACHE_ATTR_LINESIZE)
+	return 256L;
+      else
+	return 0L;
+    }
+
+  /* Store facility list and check for z10.
+     (see ifunc-resolver for details)  */
+  register unsigned long reg0 asm("0") = 0;
+#ifdef __s390x__
+  unsigned long stfle_bits;
+# define STFLE_Z10_MASK (1UL << (63 - 34))
+#else
+  unsigned long long stfle_bits;
+# define STFLE_Z10_MASK (1ULL << (63 - 34))
+#endif /* !__s390x__ */
+  asm volatile(".machine push"        "\n\t"
+	       ".machinemode \"zarch_nohighgprs\"\n\t"
+	       ".machine \"z9-109\""  "\n\t"
+	       "stfle %0"             "\n\t"
+	       ".machine pop"         "\n"
+	       : "=QS" (stfle_bits), "+d" (reg0)
+	       : : "cc");
+
+  if (!(stfle_bits & STFLE_Z10_MASK))
+    {
+      /* We are at least on a z9 machine.
+	 Return 256byte for LINESIZE for L1 d/i-cache,
+         otherwise 0.  */
+      if (level == 1 && attr == CACHE_ATTR_LINESIZE)
+	return 256L;
+      else
+	return 0L;
+    }
+
+  /* Check cache topology, if cache is available at this level.  */
+  arg = (CACHE_LEVEL_MAX - level) * 8;
+  asm volatile (".machine push\n\t"
+		".machine \"z10\"\n\t"
+		".machinemode \"zarch_nohighgprs\"\n\t"
+		"ecag %0,%%r0,0\n\t"   /* returns 64bit unsigned integer.  */
+		"srlg %0,%0,0(%1)\n\t" /* right align 8bit cache info field.  */
+		".machine pop"
+		: "=&d" (val)
+		: "a" (arg)
+		);
+  val &= 0xCUL; /* Extract cache scope information from cache topology summary.
+		   (bits 4-5 of 8bit-field; 00 means cache does not exist).  */
+  if (val == 0)
+    return 0L;
+
+  /* Get cache information for level, attribute and type.  */
+  cmd = (attr << 4) | ((level - 1) << 1) | type;
+  asm volatile (".machine push\n\t"
+		".machine \"z10\"\n\t"
+		".machinemode \"zarch_nohighgprs\"\n\t"
+		"ecag %0,%%r0,0(%1)\n\t"
+		".machine pop"
+		: "=d" (val)
+		: "a" (cmd)
+		);
+  return val;
+}
+
+long int
+__sysconf (int name)
+{
+  if (name >= _SC_LEVEL1_ICACHE_SIZE && name <= _SC_LEVEL4_CACHE_LINESIZE)
+    {
+      int level;
+      int attr;
+      int type;
+
+      switch (name)
+	{
+	case _SC_LEVEL1_ICACHE_SIZE:
+	  level = 1;
+	  attr = CACHE_ATTR_SIZE;
+	  type = CACHE_TYPE_INSTRUCTION;
+	  break;
+	case _SC_LEVEL1_ICACHE_ASSOC:
+	  level = 1;
+	  attr = CACHE_ATTR_ASSOC;
+	  type = CACHE_TYPE_INSTRUCTION;
+	  break;
+	case _SC_LEVEL1_ICACHE_LINESIZE:
+	  level = 1;
+	  attr = CACHE_ATTR_LINESIZE;
+	  type = CACHE_TYPE_INSTRUCTION;
+	  break;
+
+	case _SC_LEVEL1_DCACHE_SIZE:
+	  level = 1;
+	  attr = CACHE_ATTR_SIZE;
+	  type = CACHE_TYPE_DATA;
+	  break;
+	case _SC_LEVEL1_DCACHE_ASSOC:
+	  level = 1;
+	  attr = CACHE_ATTR_ASSOC;
+	  type = CACHE_TYPE_DATA;
+	  break;
+	case _SC_LEVEL1_DCACHE_LINESIZE:
+	  level = 1;
+	  attr = CACHE_ATTR_LINESIZE;
+	  type = CACHE_TYPE_DATA;
+	  break;
+
+	case _SC_LEVEL2_CACHE_SIZE:
+	  level = 2;
+	  attr = CACHE_ATTR_SIZE;
+	  type = CACHE_TYPE_DATA;
+	  break;
+	case _SC_LEVEL2_CACHE_ASSOC:
+	  level = 2;
+	  attr = CACHE_ATTR_ASSOC;
+	  type = CACHE_TYPE_DATA;
+	  break;
+	case _SC_LEVEL2_CACHE_LINESIZE:
+	  level = 2;
+	  attr = CACHE_ATTR_LINESIZE;
+	  type = CACHE_TYPE_DATA;
+	  break;
+
+	case _SC_LEVEL3_CACHE_SIZE:
+	  level = 3;
+	  attr = CACHE_ATTR_SIZE;
+	  type = CACHE_TYPE_DATA;
+	  break;
+	case _SC_LEVEL3_CACHE_ASSOC:
+	  level = 3;
+	  attr = CACHE_ATTR_ASSOC;
+	  type = CACHE_TYPE_DATA;
+	  break;
+	case _SC_LEVEL3_CACHE_LINESIZE:
+	  level = 3;
+	  attr = CACHE_ATTR_LINESIZE;
+	  type = CACHE_TYPE_DATA;
+	  break;
+
+	case _SC_LEVEL4_CACHE_SIZE:
+	  level = 4;
+	  attr = CACHE_ATTR_SIZE;
+	  type = CACHE_TYPE_DATA;
+	  break;
+	case _SC_LEVEL4_CACHE_ASSOC:
+	  level = 4;
+	  attr = CACHE_ATTR_ASSOC;
+	  type = CACHE_TYPE_DATA;
+	  break;
+	case _SC_LEVEL4_CACHE_LINESIZE:
+	  level = 4;
+	  attr = CACHE_ATTR_LINESIZE;
+	  type = CACHE_TYPE_DATA;
+	  break;
+
+	default:
+	  level = 0;
+	  attr = 0;
+	  type = 0;
+	  break;
+	}
+
+      return get_cache_info (level, attr, type);
+    }
+
+  return linux_sysconf (name);
+}
+
+/* Now the generic Linux version.  */
+#undef __sysconf
+#define __sysconf static linux_sysconf
+#include <sysdeps/unix/sysv/linux/sysconf.c>

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

Summary of changes:
 ChangeLog                              |    9 +
 NEWS                                   |    3 +
 sysdeps/s390/fpu/libm-test-ulps        |  472 +++++++++++++++-----------------
 sysdeps/unix/sysv/linux/s390/sysconf.c |  230 ++++++++++++++++
 4 files changed, 463 insertions(+), 251 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/s390/sysconf.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]