Re: [PATCH] totalorder, totalorderf, totalorderl: new modules

2023-10-07 Thread Bruno Haible
The gnulib CI failed today, with this error: depbase=`echo c-vsnprintf.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ ccache gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC -DEXEEXT=\"\" -I. -I.. -DGNULIB_STRICT_CHECKING=1 -fvisibility=hidden -g -O2 -MT c-vsnprintf.o -MD -MP -MF $depbase

Re: [PATCH] totalorder, totalorderf, totalorderl: new modules

2023-10-06 Thread Paul Eggert
On 2023-10-02 04:33, Bruno Haible wrote: But your portable code appears to produce fairly decent x86_64 assembly code as well. Thanks for your fixes. Yes, the goal was portability rather than saving a few instructions. A high-performance implementation of totalorder would need help from the c

Re: [PATCH] totalorder, totalorderf, totalorderl: new modules

2023-10-04 Thread Bruno Haible
> * Solaris > x86_64: ABIs 32, 64 on Solaris 10..., Solaris 11.4 > except ABI 64 with cc on Solaris 10: FAIL: test-totalorderl The cause of this test failure is that the initialization of xu, yu, zu in union { unsigned long long i[2]; long double f; } volatile xu = {0}, yu = {0}

Re: [PATCH] totalorder, totalorderf, totalorderl: new modules

2023-10-02 Thread Bruno Haible
Since this is obviously CPU dependent code, I tested it on various platforms. There were failures only on two platforms (see 'FAIL' below); the tests passed on all other platforms. * Linux/glibc x86_64: Ubuntu 22.04, Fedora 31, Debian 9.6 x86: Ubuntu 22.04, Debian 9.1 x86_64-x32: Ubuntu 22.

Re: [PATCH] totalorder, totalorderf, totalorderl: new modules

2023-10-02 Thread Bruno Haible
Note: it looks like the libstdc++ has similar functions, with a templated implementation: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96526 https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9805965e3551b66b5bd751d6076791d00cdeb137 Here's a discussion how to get nearly optimal code for this functi