summaryrefslogtreecommitdiff
path: root/src/arch/x86/utility.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-04-05 11:35:31 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-04-05 11:35:31 +0000
commit077183f7ece6aa7fcb009fb078e2e1a3370f9327 (patch)
tree3e9d50d4583a196f54b166ab1d92577f8f6cabaa /src/arch/x86/utility.hh
parent3d2a434e42b10ef30bbb590722e72ed104be669a (diff)
parentff7b89beeeabec340d5b84ed813466682a93f928 (diff)
downloadgem5-077183f7ece6aa7fcb009fb078e2e1a3370f9327.tar.xz
Merge zizzer.eecs.umich.edu:/bk/newmem
into ahchoo.blinky.homelinux.org:/home/gblack/m5/newmem-x86 --HG-- extra : convert_revision : efdbf9787383dc1df544b7276f8120285e69bf69
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;
};
};
}