summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-05-02 00:40:17 -0700
committerGabe Black <gblack@eecs.umich.edu>2010-05-02 00:40:17 -0700
commit7524fdda6a85e2b22ebdbcb7a84ddd40b5411e98 (patch)
tree200ed8cf89750cac132f2dd0d0d354cbbe1d6f4a /src/arch/x86
parentd75ad847b32e6076a673bc562d6e92c2193221dc (diff)
downloadgem5-7524fdda6a85e2b22ebdbcb7a84ddd40b5411e98.tar.xz
X86: Sometimes CPUID depends on ecx, so pass that in.
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/cpuid.cc3
-rw-r--r--src/arch/x86/cpuid.hh3
-rw-r--r--src/arch/x86/isa/decoder/two_byte_opcodes.isa3
3 files changed, 6 insertions, 3 deletions
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;