Distinguish between IA-32 and non-x86.
In case we make ws_cpuid() work on IA-32 processors, add a separate "always returns no" version of ws_cpuid() for non-x86 processors. Change-Id: Id6fbd3e5c7d4f04063bc9bcd8f1644cd617b297e Reviewed-on: https://code.wireshark.org/review/6184 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
cb7c949091
commit
35cf7c6b3c
|
@ -1,5 +1,5 @@
|
|||
/* ws_cpuid.h
|
||||
* Get the CPU info
|
||||
* Get the CPU info on x86 processors that support it
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.org>
|
||||
|
@ -51,14 +51,20 @@ ws_cpuid(guint32 *CPUInfo, int selector)
|
|||
: "a"(selector));
|
||||
return 1;
|
||||
}
|
||||
#else /* (__i386__) */
|
||||
|
||||
#elif defined(__i386__)
|
||||
static int
|
||||
ws_cpuid(guint32 *CPUInfo _U_, int selector _U_)
|
||||
{
|
||||
/* TODO: need a test if older proccesors have the cpuid instruction */
|
||||
return 0;
|
||||
}
|
||||
#elif
|
||||
static int
|
||||
ws_cpuid(guint32 *CPUInfo _U_, int selector _U_)
|
||||
{
|
||||
/* Not x86, so no cpuid instruction */
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* Other compilers */
|
||||
|
|
Loading…
Reference in New Issue