diff options
author | Richard Henderson | 2013-02-16 21:46:59 +0100 |
---|---|---|
committer | Blue Swirl | 2013-02-17 15:28:57 +0100 |
commit | f540166b7dfdf4ec2057ac322d8cbfd0691e1d65 (patch) | |
tree | 9ed4b3eed2a58ad4c14ec8e728fedf70bbb4d905 /configure | |
parent | tcg/ppc: Fix build of tcg_qemu_tb_exec() (diff) | |
download | qemu-f540166b7dfdf4ec2057ac322d8cbfd0691e1d65.tar.gz qemu-f540166b7dfdf4ec2057ac322d8cbfd0691e1d65.tar.xz qemu-f540166b7dfdf4ec2057ac322d8cbfd0691e1d65.zip |
host-utils: Use __int128_t for mul[us]64
Replace some x86_64 specific inline assembly with something that
all 64-bit hosts ought to optimize well. At worst this becomes
a call to the gcc __multi3 routine, which is no worse than our
implementation in util/host-utils.c.
With gcc 4.7, we get identical code generation for x86_64. We
now get native multiplication on ia64 and s390x hosts. With minor
improvements to gcc we can get it for ppc64 as well.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -3150,6 +3150,22 @@ if compile_prog "" "" ; then cpuid_h=yes fi +######################################## +# check if __[u]int128_t is usable. + +int128=no +cat > $TMPC << EOF +__int128_t a; +__uint128_t b; +int main (void) { + a = a + b; + b = a * b; + return 0; +} +EOF +if compile_prog "" "" ; then + int128=yes +fi ########################################## # End of CC checks @@ -3692,6 +3708,10 @@ if test "$cpuid_h" = "yes" ; then echo "CONFIG_CPUID_H=y" >> $config_host_mak fi +if test "$int128" = "yes" ; then + echo "CONFIG_INT128=y" >> $config_host_mak +fi + if test "$glusterfs" = "yes" ; then echo "CONFIG_GLUSTERFS=y" >> $config_host_mak fi |