diff options
Diffstat (limited to 'src/arch/x86/isa/decoder/two_byte_opcodes.isa')
-rw-r--r-- | src/arch/x86/isa/decoder/two_byte_opcodes.isa | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa index 34b79a6a4..3b187d625 100644 --- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa @@ -721,12 +721,19 @@ 0x1: pop_fs(); 0x2: CPUIDInst::CPUID({{ CpuidResult result; - success = doCpuid(xc->tcBase(), bits(Rax, 31, 0), + bool success = doCpuid(xc->tcBase(), bits(Rax, 31, 0), bits(Rcx, 31, 0), result); - Rax = result.rax; - Rbx = result.rbx; - Rcx = result.rcx; - Rdx = result.rdx; + if (success) { + Rax = result.rax; + Rbx = result.rbx; + Rcx = result.rcx; + Rdx = result.rdx; + } else { + Rax = Rax; + Rbx = Rbx; + Rcx = Rcx; + Rdx = Rdx; + } }}); 0x3: Inst::BT(Ev,Gv); 0x4: Inst::SHLD(Ev,Gv,Ib); |