Commit 674d2dbe authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

realmode: fix typo in test_cpuid

ECX is initialized to 0 in case the highest CPUID leaf has
sub-functions (as is the case for 0xD on processors with XSAVE).
However, this was only happening in the big real mode case due
to a typo in the asm constraint.

Signed-off-by: default avatarPaolo Bonzini <>
parent b5105e8b
......@@ -1388,7 +1388,7 @@ static void test_cpuid(void)
inregs.eax = eax = function;
inregs.ecx = ecx = 0;
asm("cpuid" : "+a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx));
asm("cpuid" : "+a"(eax), "=b"(ebx), "+c"(ecx), "=d"(edx));
report("cpuid", R_AX|R_BX|R_CX|R_DX,
outregs.eax == eax && outregs.ebx == ebx
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment