1
0
mirror of https://github.com/google/cpu_features.git synced 2025-07-02 05:33:17 +02:00

Add support for leaf2 and leaf4 on Intel's x86 arch (#80)

* Add support for leaf4 on Intel's x86 arch
* Update cpuinfo_x86.h
* Fix typo
* Force compiler to use C99
* Add Intel x86 leaf2 support
* Fixes after review
* Fix review comments
This commit is contained in:
Artem Alekseev
2019-07-02 17:52:25 +03:00
committed by Guillaume Chatelet
parent bfd109b687
commit 653d581e03
9 changed files with 607 additions and 35 deletions

View File

@ -15,6 +15,7 @@
#ifndef CPU_FEATURES_INCLUDE_CPUINFO_X86_H_
#define CPU_FEATURES_INCLUDE_CPUINFO_X86_H_
#include "cpu_features_cache_info.h"
#include "cpu_features_macros.h"
CPU_FEATURES_START_CPP_NAMESPACE
@ -93,6 +94,12 @@ typedef struct {
// This function is guaranteed to be malloc, memset and memcpy free.
X86Info GetX86Info(void);
// Returns cache hierarchy informations.
// Can call cpuid multiple times.
// Only works on Intel CPU at the moment.
// This function is guaranteed to be malloc, memset and memcpy free.
CacheInfo GetX86CacheInfo(void);
typedef enum {
X86_UNKNOWN,
INTEL_CORE, // CORE