On Freitag, 29. April 2016 15:13:56 CEST Aurelien Jacobs wrote: > On Sun, Apr 24, 2016 at 03:46:17PM +0200, Stefan Bruens wrote: > > Hi folks, > > > > another round of patches, available at: > > > > https://github.com/StefanBruens/libsigrok.git for_upstream_20160424 > > > > [...] > > > > [3] The equality check is exact, but requires int64 -> __int_128 > > multiplication. This is supported natively by GCC 4.8 and beyond, and > > VS2015. > > __int128_t is clearly a non-standard, non-portable type. > GCC only supports it on x86-64 but not on 32 bits x86 (you can try to > build an example with gcc -m32). > > > In case this is an issue, the multiplication can be implemented in > > pure C, > > although with a slight performance loss. > > I think it must be implemented in a portable way, so yes, you should > implement it in pure C. > If perfomance is really an issue, you could provide an alternative fast > version using __int128_t with compiler support detection in the > configure script, but I doubt this is so critical.
I have added the C implementation for uint64/int64 multiplication, as well as detection of compiler support for __(u)int128_t to configure.ac. The new code is available at: https://github.com/StefanBruens/libsigrok.git for_upstream_20160430 Kind regards, Stefan -- Stefan Brüns / Bergstraße 21 / 52062 Aachen home: +49 241 53809034 mobile: +49 151 50412019 work: +49 2405 49936-424 ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z _______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel