mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-06-01 03:30:20 +00:00
i386: Add cache information in X86CPUDefinition
Add cache information in X86CPUDefinition and CPUX86State. Backports commit 6aaeb05492ef668f415324f43e7d875c0f1e90b3 from qemu
This commit is contained in:
parent
db87beaaa6
commit
c5b8a6a704
|
@ -1239,6 +1239,7 @@ struct X86CPUDefinition {
|
||||||
FeatureWordArray features;
|
FeatureWordArray features;
|
||||||
const char *model_id;
|
const char *model_id;
|
||||||
bool cache_info_passthrough;
|
bool cache_info_passthrough;
|
||||||
|
CPUCaches *cache_info;
|
||||||
};
|
};
|
||||||
|
|
||||||
static X86CPUDefinition builtin_x86_defs[] = {
|
static X86CPUDefinition builtin_x86_defs[] = {
|
||||||
|
|
|
@ -1053,6 +1053,13 @@ typedef struct CPUCacheInfo {
|
||||||
bool complex_indexing;
|
bool complex_indexing;
|
||||||
} CPUCacheInfo;
|
} CPUCacheInfo;
|
||||||
|
|
||||||
|
typedef struct CPUCaches {
|
||||||
|
CPUCacheInfo l1d_cache;
|
||||||
|
CPUCacheInfo l1i_cache;
|
||||||
|
CPUCacheInfo l2_cache;
|
||||||
|
CPUCacheInfo l3_cache;
|
||||||
|
} CPUCaches;
|
||||||
|
|
||||||
typedef struct CPUX86State {
|
typedef struct CPUX86State {
|
||||||
/* standard registers */
|
/* standard registers */
|
||||||
target_ulong regs[CPU_NB_REGS];
|
target_ulong regs[CPU_NB_REGS];
|
||||||
|
@ -1227,6 +1234,7 @@ typedef struct CPUX86State {
|
||||||
/* Features that were explicitly enabled/disabled */
|
/* Features that were explicitly enabled/disabled */
|
||||||
FeatureWordArray user_features;
|
FeatureWordArray user_features;
|
||||||
uint32_t cpuid_model[12];
|
uint32_t cpuid_model[12];
|
||||||
|
CPUCaches *cache_info;
|
||||||
|
|
||||||
/* MTRRs */
|
/* MTRRs */
|
||||||
uint64_t mtrr_fixed[11];
|
uint64_t mtrr_fixed[11];
|
||||||
|
|
Loading…
Reference in a new issue