1 /* C API for x86 cpuid insn.
2 Copyright (C) 2007-2015 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This file is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 3, or (at your option) any
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 #ifndef X86_CPUID_COMMON_H
20 #define X86_CPUID_COMMON_H
22 /* Always include the header for the cpu bit defines. */
23 #include "x86-gcc-cpuid.h"
25 #if defined(__i386__) || defined(__x86_64__)
27 /* Return cpuid data for requested cpuid level, as found in returned
28 eax, ebx, ecx and edx registers. The function checks if cpuid is
29 supported and returns 1 for valid cpuid information or 0 for
30 unsupported cpuid level. Pointers may be non-null. */
33 x86_cpuid (unsigned int __level
,
34 unsigned int *__eax
, unsigned int *__ebx
,
35 unsigned int *__ecx
, unsigned int *__edx
)
37 unsigned int __scratch
;
48 return __get_cpuid (__level
, __eax
, __ebx
, __ecx
, __edx
);
54 x86_cpuid (unsigned int __level
,
55 unsigned int *__eax
, unsigned int *__ebx
,
56 unsigned int *__ecx
, unsigned int *__edx
)
61 #endif /* i386 && x86_64 */
63 #endif /* X86_CPUID_COMMON_H */
This page took 0.029974 seconds and 4 git commands to generate.