|
Message-ID: <20170610182950.GV9350@port70.net> Date: Sat, 10 Jun 2017 20:29:50 +0200 From: Szabolcs Nagy <nsz@...t70.net> To: musl@...ts.openwall.com Cc: David Edelsohn <dje.gcc@...il.com> Subject: Re: [PATCH] s390x: Add single instruction math functions * David Edelsohn <dje.gcc@...il.com> [2017-06-10 13:25:00 -0400]: > On Sat, Jun 10, 2017 at 11:36 AM, Szabolcs Nagy <nsz@...t70.net> wrote: > > * David Edelsohn <dje.gcc@...il.com> [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=s390x-linux-musl-gcc COLLECT_LTO_WRAPPER=/home/nsz/w/mcm/output/bin/../libexec/gcc/s390x-linux-musl/6.3.0/lto-wrapper Target: s390x-linux-musl Configured with: ../src_toolchain/configure --enable-languages=c,c++ CFLAGS='-g0 -Os' CXXFLAGS='-g0 -Os' LDFLAGS=-s --disable-nls --with-debug-prefix-map=/home/nsz/w/mcm/build-s390x-linux-musl= --enable-languages=c,c++ --disable-libquadmath --disable-libquadmath-support --disable-decimal-float --disable-multilib --disable-libcilkrts --disable-libvtv --disable-libgomp --disable-libitm --disable-werror --target=s390x-linux-musl --prefix= --libdir=/lib --disable-multilib --with-sysroot=/s390x-linux-musl --enable-tls --disable-libmudflap --disable-libsanitizer --disable-gnu-indirect-function --disable-libmpx --enable-libstdcxx-time --with-build-sysroot=/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" .text .align 8 .globl f .type f, @function f: .LFB0: .cfi_startproc jg ceil .cfi_endproc .LFE0: .size f, .-f .ident "GCC: (GNU) 6.3.0" .section .note.GNU-stack,"",@progbits > > at some point we plan to have some internal header to turn > > math/string calls into builtins when compiling musl with gcc) > > I have a patch set ready for powerpc64 teed up after this patch. > > Thanks, David
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.