Changes v1->v2: * Use __[u]int128_t as per Blue's comment. I'd actually forgotten that gcc automatically addeds those typedefs.
* Keep the internal mul64 routine, but mark it inline. The v1 patch relied in gcc's pre-c99 inlining semantics. The v2 patch ought to compile in strict c99 mode. * Add unit tests, as per Andreas' comment. Tested on x86_64, i686, and arm hosts. r~ Richard Henderson (3): host-utils: Use __int128_t for mul[us]64 host-utils: Improve mulu64 and muls64 tests: Add unit tests for mulu64 and muls64 configure | 20 ++++++++++ include/qemu/host-utils.h | 17 ++++----- tests/Makefile | 7 +++- tests/test-mul64.c | 69 ++++++++++++++++++++++++++++++++++ util/host-utils.c | 96 ++++++++++++++++++++--------------------------- 5 files changed, 143 insertions(+), 66 deletions(-) create mode 100644 tests/test-mul64.c -- 1.7.11.7