Clean up i386/x86-64 cpuid usage in hwfeatures.c
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Thu, 20 Dec 2012 13:46:57 +0000 (15:46 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 21 Dec 2012 13:56:31 +0000 (14:56 +0100)
commitd842eea55e22c05da3959a7a4422b5fcd7884f60
treea5184b73cf426a2c4778fdb5bc9915a023f4517b
parentefd7002188e6d50013e4d9a920a8b9afa9d210e5
Clean up i386/x86-64 cpuid usage in hwfeatures.c

* src/hwfeatures.c [__i386__ && __GNUC__] (detect_ia32_gnuc): Remove.
[__x86_64__ && __GNUC__] (detect_x86_64_gnuc): Remove.
[__i386__ && __GNUC__] (is_cpuid_available, get_cpuid)
(HAS_X86_CPUID): New.
[__x86_64__ && __GNUC__] (is_cpuid_available, get_cpuid)
(HAS_X86_CPUID): New.
[HAS_X86_CPUID] (detect_x86_gnuc): New.
(_gcry_detect_hw_features) [__i386__ && GNUC]: Remove detect_ia32_gnuc
call.
(_gcry_detect_hw_features) [__x86_64__ && GNUC]: Remove
detect_x86_64_gnuc call.
(_gcry_detect_hw_features) [HAS_X86_CPUID]: Add detect_x86_gnuc call.
--

For hwfeatures.c clean up, merge i386/x86-64 hardware detection and move
i386/x86-64 spesific assembler to separate functions, is_cpuid_available() and
get_cpuid().

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
src/hwfeatures.c