diff options
author | Jakub Zawadzki <darkjames@darkjames.pl> | 2014-06-09 23:18:24 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-06-10 08:12:43 +0000 |
commit | 4571283379857f1a1a783ea037ffaeb5a19562b8 (patch) | |
tree | f394f9f6c1be14f01c2e6feb19ff3033f1af7f7d /version_info.c | |
parent | 8878d7778e6fb10bf9e6ce20af16f4e247e51e04 (diff) |
CPUID improvements
- Make ws_cpuid() return boolean when CPUID is support or no, this way
it's easier for caller to determinate if it works (and can use cpuinfo[X] or no).
- Add function ws_cpuid_sse42(), use it in ws_mempbrk() [cached] &
version information.
Change-Id: I4e77699f9f3d11bb9b2e8ea599e48d3c5ad84ed7
Reviewed-on: https://code.wireshark.org/review/2088
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'version_info.c')
-rw-r--r-- | version_info.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/version_info.c b/version_info.c index c400130fd5..8bc254c099 100644 --- a/version_info.c +++ b/version_info.c @@ -629,7 +629,8 @@ static void get_cpu_info(GString *str _U_) /* Calling __cpuid with 0x80000000 as the InfoType argument*/ /* gets the number of valid extended IDs.*/ - ws_cpuid(CPUInfo, 0x80000000); + if (!ws_cpuid(CPUInfo, 0x80000000)) + return; nExIds = CPUInfo[0]; if( nExIds<0x80000005) @@ -646,6 +647,8 @@ static void get_cpu_info(GString *str _U_) g_string_append_printf(str, "\n%s", CPUBrandString); + if (ws_cpuid_sse42()) + g_string_append(str, " (with SSE4.2)"); } static void get_mem_info(GString *str _U_) |