utility.hh (4181:6edaeff44647) utility.hh (4182:5b2c0d266107)
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 *

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

54 *
55 * Authors: Gabe Black
56 */
57
58#ifndef __ARCH_X86_UTILITY_HH__
59#define __ARCH_X86_UTILITY_HH__
60
61#include "arch/x86/types.hh"
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 *

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

54 *
55 * Authors: Gabe Black
56 */
57
58#ifndef __ARCH_X86_UTILITY_HH__
59#define __ARCH_X86_UTILITY_HH__
60
61#include "arch/x86/types.hh"
62#include "base/hashmap.hh"
62#include "base/misc.hh"
63#include "sim/host.hh"
64
65class ThreadContext;
66
63#include "base/misc.hh"
64#include "sim/host.hh"
65
66class ThreadContext;
67
68namespace __hash_namespace {
69 template<>
70 struct hash<X86ISA::ExtMachInst> {
71 size_t operator()(const X86ISA::ExtMachInst &emi) const {
72 //Because these are all the same, return 0
73 return 0;
74 };
75 };
76}
77
67namespace X86ISA
68{
69 static inline bool
70 inUserMode(ThreadContext *tc)
71 {
72 return false;
73 }
74
78namespace X86ISA
79{
80 static inline bool
81 inUserMode(ThreadContext *tc)
82 {
83 return false;
84 }
85
75 PredecodeResult {
76 MoreBytes = 1,
77 ExtMIReady = 2
78 };
79
80 unsigned int
81 predecode(ExtMachInst &extMachInst, Addr currPC, MachInst machInst,
82 ThreadContext * xc) {
83 //Do something to fill up extMachInst...
84 return MoreBytes | ExtMIReady;
85 }
86
87 inline bool isCallerSaveIntegerRegister(unsigned int reg) {
88 panic("register classification not implemented");
89 return false;
90 }
91
92 inline bool isCalleeSaveIntegerRegister(unsigned int reg) {
93 panic("register classification not implemented");
94 return false;

--- 44 unchanged lines hidden ---
86 inline bool isCallerSaveIntegerRegister(unsigned int reg) {
87 panic("register classification not implemented");
88 return false;
89 }
90
91 inline bool isCalleeSaveIntegerRegister(unsigned int reg) {
92 panic("register classification not implemented");
93 return false;

--- 44 unchanged lines hidden ---