summaryrefslogtreecommitdiff
path: root/src/arch/x86/utility.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-04-06 14:37:46 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-04-06 14:37:46 +0000
commit3c9768e6448b72689e9edb250dd0ee3e5eadb9d7 (patch)
treef950d270e92348f95e3464cf51de4003510c9f07 /src/arch/x86/utility.hh
parenta664017c2a839279f8b8eea1076bba47d1863b88 (diff)
parent077183f7ece6aa7fcb009fb078e2e1a3370f9327 (diff)
downloadgem5-3c9768e6448b72689e9edb250dd0ee3e5eadb9d7.tar.xz
Merge zizzer.eecs.umich.edu:/bk/newmem
into ahchoo.blinky.homelinux.org:/home/gblack/m5/newmem-o3-spec --HG-- extra : convert_revision : b7e89d32df946ea24c438292308f5fc8248f8bd9
Diffstat (limited to 'src/arch/x86/utility.hh')
-rw-r--r--src/arch/x86/utility.hh11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/arch/x86/utility.hh b/src/arch/x86/utility.hh
index d89e223de..e0bd09515 100644
--- a/src/arch/x86/utility.hh
+++ b/src/arch/x86/utility.hh
@@ -70,8 +70,15 @@ namespace __hash_namespace {
template<>
struct hash<X86ISA::ExtMachInst> {
size_t operator()(const X86ISA::ExtMachInst &emi) const {
- //Because these are all the same, return 0
- return 0;
+ return (((uint64_t)emi.legacy << 56) |
+ ((uint64_t)emi.rex << 48) |
+ ((uint64_t)emi.modRM << 40) |
+ ((uint64_t)emi.sib << 32) |
+ ((uint64_t)emi.opcode.num << 24) |
+ ((uint64_t)emi.opcode.prefixA << 16) |
+ ((uint64_t)emi.opcode.prefixB << 8) |
+ ((uint64_t)emi.opcode.op)) ^
+ emi.immediate ^ emi.displacement;
};
};
}