mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 10:25:28 +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;
|
||||
const char *model_id;
|
||||
bool cache_info_passthrough;
|
||||
CPUCaches *cache_info;
|
||||
};
|
||||
|
||||
static X86CPUDefinition builtin_x86_defs[] = {
|
||||
|
|
|
@ -1053,6 +1053,13 @@ typedef struct CPUCacheInfo {
|
|||
bool complex_indexing;
|
||||
} CPUCacheInfo;
|
||||
|
||||
typedef struct CPUCaches {
|
||||
CPUCacheInfo l1d_cache;
|
||||
CPUCacheInfo l1i_cache;
|
||||
CPUCacheInfo l2_cache;
|
||||
CPUCacheInfo l3_cache;
|
||||
} CPUCaches;
|
||||
|
||||
typedef struct CPUX86State {
|
||||
/* standard registers */
|
||||
target_ulong regs[CPU_NB_REGS];
|
||||
|
@ -1227,6 +1234,7 @@ typedef struct CPUX86State {
|
|||
/* Features that were explicitly enabled/disabled */
|
||||
FeatureWordArray user_features;
|
||||
uint32_t cpuid_model[12];
|
||||
CPUCaches *cache_info;
|
||||
|
||||
/* MTRRs */
|
||||
uint64_t mtrr_fixed[11];
|
||||
|
|
Loading…
Reference in a new issue