host-utils: Improve mulu64 and muls64
authorRichard Henderson <rth@twiddle.net>
Sat, 16 Feb 2013 20:47:00 +0000 (12:47 -0800)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 17 Feb 2013 14:28:58 +0000 (14:28 +0000)
commitff7a1eb0a1262f7d451cc1e70c65dd23771ce2a2
tree56339a9d32d57eac9d7d5c70c54eca00763daee0
parentf540166b7dfdf4ec2057ac322d8cbfd0691e1d65
host-utils: Improve mulu64 and muls64

The new formulation makes better use of add-with-carry type insns
that the host may have.  Use gcc's sign adjustment trick to avoid
having to perform a 128-bit negation.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
util/host-utils.c