mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 19:51:10 +00:00
i386: correct cpu_x86_cpuid(0xd)
Intel SDM says for CPUID function 0DH, sub-function 0: | • ECX enumerates the size (in bytes) required by the XSAVE instruction for an | XSAVE area containing all the user state components supported by this | processor. | • EBX enumerates the size (in bytes) required by the XSAVE instruction for an | XSAVE area containing all the user state components corresponding to bits | currently set in XCR0. Backports commit de2e68c902f7b6e438b0fa3cfedd74a06a20704f from qemu
This commit is contained in:
parent
7c94b86d31
commit
a09a074255
|
@ -4241,7 +4241,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
|
||||||
*ecx = xsave_area_size(x86_cpu_xsave_components(cpu));
|
*ecx = xsave_area_size(x86_cpu_xsave_components(cpu));
|
||||||
*eax = env->features[FEAT_XSAVE_COMP_LO];
|
*eax = env->features[FEAT_XSAVE_COMP_LO];
|
||||||
*edx = env->features[FEAT_XSAVE_COMP_HI];
|
*edx = env->features[FEAT_XSAVE_COMP_HI];
|
||||||
*ebx = *ecx;
|
*ebx = xsave_area_size(env->xcr0);
|
||||||
} else if (count == 1) {
|
} else if (count == 1) {
|
||||||
*eax = env->features[FEAT_XSAVE];
|
*eax = env->features[FEAT_XSAVE];
|
||||||
} else if (count < ARRAY_SIZE(x86_ext_save_areas)) {
|
} else if (count < ARRAY_SIZE(x86_ext_save_areas)) {
|
||||||
|
|
Loading…
Reference in a new issue