utility.hh (7629:0f0c231e3e97) utility.hh (7680:f4eda002333b)
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

45#include "base/hashmap.hh"
46#include "base/misc.hh"
47#include "base/types.hh"
48#include "config/full_system.hh"
49#include "cpu/thread_context.hh"
50
51class ThreadContext;
52
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

45#include "base/hashmap.hh"
46#include "base/misc.hh"
47#include "base/types.hh"
48#include "config/full_system.hh"
49#include "cpu/thread_context.hh"
50
51class ThreadContext;
52
53namespace __hash_namespace {
54 template<>
55 struct hash<X86ISA::ExtMachInst> {
56 size_t operator()(const X86ISA::ExtMachInst &emi) const {
57 return (((uint64_t)emi.legacy << 56) |
58 ((uint64_t)emi.rex << 48) |
59 ((uint64_t)emi.modRM << 40) |
60 ((uint64_t)emi.sib << 32) |
61 ((uint64_t)emi.opcode.num << 24) |
62 ((uint64_t)emi.opcode.prefixA << 16) |
63 ((uint64_t)emi.opcode.prefixB << 8) |
64 ((uint64_t)emi.opcode.op)) ^
65 emi.immediate ^ emi.displacement ^
66 emi.mode ^
67 emi.opSize ^ emi.addrSize ^
68 emi.stackSize ^ emi.dispSize;
69 };
70 };
71}
72
73namespace X86ISA
74{
75 uint64_t getArgument(ThreadContext *tc, int number, bool fp);
76
77 static inline bool
78 inUserMode(ThreadContext *tc)
79 {
80#if FULL_SYSTEM

--- 28 unchanged lines hidden ---
53namespace X86ISA
54{
55 uint64_t getArgument(ThreadContext *tc, int number, bool fp);
56
57 static inline bool
58 inUserMode(ThreadContext *tc)
59 {
60#if FULL_SYSTEM

--- 28 unchanged lines hidden ---