X86: Ensure that the CPUID instruction always writes its outputs.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 4 Jun 2012 17:43:09 +0000 (10:43 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 4 Jun 2012 17:43:09 +0000 (10:43 -0700)
commit35fa5074aa256880f70591eb656dceeb1a7feae0
tree79704dcdb74aa43ee14c3cdb0d9aff19a41a570a
parent7b73c36f5d52073025223dcdaca749758d274d52
X86: Ensure that the CPUID instruction always writes its outputs.

The CPUID instruction was implemented so that it would only write its results
if the instruction was successful. This works fine on the simple CPU where
unwritten registers retain their old values, but on a CPU like O3 with
renaming this is broken. The instruction needs to write the old values back
into the registers explicitly if they aren't being changed.
src/arch/x86/isa/decoder/two_byte_opcodes.isa
src/arch/x86/isa/formats/cpuid.isa