utility.hh (4241:0a4218540c6d) utility.hh (4334:15815fd6b30c)
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 56 unchanged lines hidden (view full) ---

65#include "sim/host.hh"
66
67class ThreadContext;
68
69namespace __hash_namespace {
70 template<>
71 struct hash<X86ISA::ExtMachInst> {
72 size_t operator()(const X86ISA::ExtMachInst &emi) const {
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 56 unchanged lines hidden (view full) ---

65#include "sim/host.hh"
66
67class ThreadContext;
68
69namespace __hash_namespace {
70 template<>
71 struct hash<X86ISA::ExtMachInst> {
72 size_t operator()(const X86ISA::ExtMachInst &emi) const {
73 //Because these are all the same, return 0
74 return 0;
73 return (((uint64_t)emi.legacy << 56) |
74 ((uint64_t)emi.rex << 48) |
75 ((uint64_t)emi.modRM << 40) |
76 ((uint64_t)emi.sib << 32) |
77 ((uint64_t)emi.opcode.num << 24) |
78 ((uint64_t)emi.opcode.prefixA << 16) |
79 ((uint64_t)emi.opcode.prefixB << 8) |
80 ((uint64_t)emi.opcode.op)) ^
81 emi.immediate ^ emi.displacement;
75 };
76 };
77}
78
79namespace X86ISA
80{
81 static inline bool
82 inUserMode(ThreadContext *tc)

--- 61 unchanged lines hidden ---
82 };
83 };
84}
85
86namespace X86ISA
87{
88 static inline bool
89 inUserMode(ThreadContext *tc)

--- 61 unchanged lines hidden ---