From: Gabe Black Date: Sun, 2 May 2010 07:40:17 +0000 (-0700) Subject: X86: Sometimes CPUID depends on ecx, so pass that in. X-Git-Tag: stable_2012_02_02~1417 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7524fdda6a85e2b22ebdbcb7a84ddd40b5411e98;p=gem5.git X86: Sometimes CPUID depends on ecx, so pass that in. --- diff --git a/src/arch/x86/cpuid.cc b/src/arch/x86/cpuid.cc index cbd1defee..6b686f38a 100644 --- a/src/arch/x86/cpuid.cc +++ b/src/arch/x86/cpuid.cc @@ -79,7 +79,8 @@ namespace X86ISA { } bool - doCpuid(ThreadContext * tc, uint32_t function, CpuidResult &result) + doCpuid(ThreadContext * tc, uint32_t function, + uint32_t index, CpuidResult &result) { uint16_t family = bits(function, 31, 16); uint16_t funcNum = bits(function, 15, 0); diff --git a/src/arch/x86/cpuid.hh b/src/arch/x86/cpuid.hh index d8b013ba1..8d3181819 100644 --- a/src/arch/x86/cpuid.hh +++ b/src/arch/x86/cpuid.hh @@ -55,7 +55,8 @@ namespace X86ISA {} }; - bool doCpuid(ThreadContext * tc, uint32_t function, CpuidResult &result); + bool doCpuid(ThreadContext * tc, uint32_t function, + uint32_t index, CpuidResult &result); } // namespace X86ISA #endif diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa index 288c5e5a8..4b892cda2 100644 --- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa @@ -767,7 +767,8 @@ 0x1: pop_fs(); 0x2: CPUIDInst::CPUID({{ CpuidResult result; - success = doCpuid(xc->tcBase(), bits(Rax, 31, 0), result); + success = doCpuid(xc->tcBase(), bits(Rax, 31, 0), + bits(Rcx, 31, 0), result); Rax = result.rax; Rbx = result.rbx; Rcx = result.rcx;