]> git.proxmox.com Git - qemu.git/commit
softfloat: use GCC builtins to count the leading zeros
authorAurelien Jarno <aurelien@aurel32.net>
Wed, 13 Apr 2011 22:49:29 +0000 (00:49 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 17 Apr 2011 18:32:14 +0000 (20:32 +0200)
commitb3b4c7f33fc8e51db75bf4abaf4a631c2f1fb23b
treeb2ae2e51d576be0a351cc65cb84848e3093f14e6
parenta0102082de4026833afbd2525e8a6320d1f92885
softfloat: use GCC builtins to count the leading zeros

Softfloat has its own implementation to count the leading zeros. However
a lot of architectures have either a dedicated instruction or an
optimized to do that. When using GCC >= 3.4, this patch uses GCC builtins
instead of the handcoded implementation.

Note that I amware that QEMU_GNUC_PREREQ is defined in osdep.h and that
clz32() and clz64() are defined in host-utils.h, but I think it is better
to keep the softfloat implementation self contained.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
fpu/softfloat-macros.h