From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11429 Path: news.gmane.org!.POSTED!not-for-mail From: David Edelsohn Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] s390x: Add single instruction math functions Date: Sat, 10 Jun 2017 14:53:14 -0400 Message-ID: References: <20170610153648.GT9350@port70.net> <20170610182950.GV9350@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1497120809 29842 195.159.176.226 (10 Jun 2017 18:53:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Jun 2017 18:53:29 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-11442-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jun 10 20:53:25 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dJlVk-0007S5-N9 for gllmg-musl@m.gmane.org; Sat, 10 Jun 2017 20:53:24 +0200 Original-Received: (qmail 3328 invoked by uid 550); 10 Jun 2017 18:53:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 3298 invoked from network); 10 Jun 2017 18:53:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=6gwAMBKhkv/SkFCwQ+JcVfRZ0L8TQSjQkK6blIilp+0=; b=sQWNkNzOun5Ph8jrbIILoQhdhbNfsvoemnzBSK42A0X4Vy4pq3fQGgHFUyuYSYfCq6 +EyPlG58lny16Dzm80W17oS79CxyiniQcgQXE54/2RSjIBUo87c8qoOTDBTKBwf32NIm zlk5G+0O5qi4JcZGX5b+cqiqz2jZnu99K8AOVnHISdIyeGS+ZeN1toZVuK3OPz4FEtVA 0IrVGqlpuxlRwtyu+BVRUaGe6yx/mBAmr2BECNDQ3Hbps1cR/DZKWRrU5qEa6zqVGi75 g3dRPx/FjSJGF3fIZa7sTFVFNs1LHzPuxNHxJD1gYKTSbK7Xi/syRqdcAHXcvE6iAcvT A5WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=6gwAMBKhkv/SkFCwQ+JcVfRZ0L8TQSjQkK6blIilp+0=; b=WhAO3SL09xFJo0SzhjPY+MlJN2Yx13UrLstVGr3xpkqn6qeHMVSHEMl3ky1tIfMdmH dNLu1iwCpjyqCUmtgZUfQO0xLBmmx/MmvIbmkzUxQAJP8vX9ZmEA9MglazhuPxAkEdrp k/bGtRTLyIo0oFOs4yMSQYTwavgEbwg4dCIAjgfmNOW0IjpA7CxJiZim1G2fK/v/zNog vS89QMJP4mZUEvstXTqvAfsY58e03QL5eWP1/Jdy4djIYNAqHUsLSZzenl7RTgvPjhkN BH/D2rSMbI4fHn4nfV0F2jJXh5CBU2I+T+qWSrZsubo5hEEl4dWwWydhXBgSoAopSWrg DjwQ== X-Gm-Message-State: AKS2vOyE15ucAYZ61MNbAu5nwSBQUuFYBHk9whh6EdNXPZY5yWbTVBQI gPJyP0ag+FPBm1x3uBgjW+ABhTcdOw== X-Received: by 10.55.162.145 with SMTP id l139mr31080194qke.162.1497120795162; Sat, 10 Jun 2017 11:53:15 -0700 (PDT) In-Reply-To: <20170610182950.GV9350@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:11429 Archived-At: On Sat, Jun 10, 2017 at 2:29 PM, Szabolcs Nagy wrote: > * David Edelsohn [2017-06-10 13:25:00 -0400]: >> On Sat, Jun 10, 2017 at 11:36 AM, Szabolcs Nagy wrote: >> > * David Edelsohn [2017-06-09 10:51:25 -0400]: >> >> The following patch is a start at single instruction math functions >> >> for s390x architecture to increase performance. >> > >> > looks good, i wonder why gcc does not have builtins support for >> > ceil, floor, nearbyint, round and trunc >> > >> > (on aarch64 the builtins expand to single instruction with >> > -fno-math-errno, but on s390x they remain libc calls >> >> Both the functions and builtins are converted to single instructions >> for me. What architecture level is your GCC assuming? >> > > i think it's the default s390x config > > $ s390x-linux-musl-gcc -v > Using built-in specs. > COLLECT_GCC=3Ds390x-linux-musl-gcc > COLLECT_LTO_WRAPPER=3D/home/nsz/w/mcm/output/bin/../libexec/gcc/s390x-lin= ux-musl/6.3.0/lto-wrapper > Target: s390x-linux-musl > Configured with: ../src_toolchain/configure --enable-languages=3Dc,c++ CF= LAGS=3D'-g0 -Os' CXXFLAGS=3D'-g0 -Os' LDFLAGS=3D-s --disable-nls --with-deb= ug-prefix-map=3D/home/nsz/w/mcm/build-s390x-linux-musl=3D --enable-language= s=3Dc,c++ --disable-libquadmath --disable-libquadmath-support --disable-dec= imal-float --disable-multilib --disable-libcilkrts --disable-libvtv --disab= le-libgomp --disable-libitm --disable-werror --target=3Ds390x-linux-musl --= prefix=3D --libdir=3D/lib --disable-multilib --with-sysroot=3D/s390x-linux-= musl --enable-tls --disable-libmudflap --disable-libsanitizer --disable-gnu= -indirect-function --disable-libmpx --enable-libstdcxx-time --with-build-sy= sroot=3D/home/nsz/w/mcm/build-s390x-linux-musl/obj_sysroot > Thread model: posix > gcc version 6.3.0 (GCC) > $ cat a.c > double f(double x) > { > return __builtin_ceil(x); > } > $ s390x-linux-musl-gcc -O3 -fno-math-errno -S a.c -o - > .machinemode zarch > .machine "z900" Note the default architecture is z900 from 2005-2006. The FP instructions were added with the z196 processors in 2010. s390x-linux-musl probably should default to a much newer processor level, such as at least z196 or zEC12 - David