This improves code generation for mul[us]64 for all hosts.

In the case of ia64 and s390x we see immediate benefit as
we get to use the native 128-bit multiply insn.  In the
case of ppc64, we need a patch to gcc to enable this; I
hope to get such a patch into gcc 4.8.0, but it may have
to wait for gcc 4.8.1.

In the case of 32-bit hosts like i386 and arm, the second
patch enables better use of add-with-carry type insns.
Examining both of these targets reveals smaller code that
is also now branchless.

Perhaps this ought to be considered for 1.4?


r~



Richard Henderson (2):
  host-utils: Use __int128 for mul[us]64
  host-utils: Improve mulu64 and muls64

 configure                 |  20 +++++++++
 include/qemu/host-utils.h |  17 ++++----
 util/host-utils.c         | 102 ++++++++++++++++++----------------------------
 3 files changed, 68 insertions(+), 71 deletions(-)

-- 
1.7.11.7


Reply via email to