Deleted Added
sdiff udiff text old ( 11165:d90aec9435bd ) new ( 11168:f98eb2da15a4 )
full compact
1/*
2 * Copyright (c) 2012 Google
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

27 *
28 * Authors: Gabe Black
29 */
30
31#ifndef __ARCH_X86_DECODER_HH__
32#define __ARCH_X86_DECODER_HH__
33
34#include <cassert>
35#include <unordered_map>
36#include <vector>
37
38#include "arch/x86/regs/misc.hh"
39#include "arch/x86/types.hh"
40#include "base/bitfield.hh"
41#include "base/misc.hh"
42#include "base/trace.hh"
43#include "base/types.hh"

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

219
220 protected:
221 /// Caching for decoded instruction objects.
222
223 typedef MiscReg CacheKey;
224
225 typedef DecodeCache::AddrMap<Decoder::InstBytes> DecodePages;
226 DecodePages *decodePages;
227 typedef std::unordered_map<CacheKey, DecodePages *> AddrCacheMap;
228 AddrCacheMap addrCacheMap;
229
230 DecodeCache::InstMap *instMap;
231 typedef std::unordered_map<CacheKey, DecodeCache::InstMap *> InstCacheMap;
232 static InstCacheMap instCacheMap;
233
234 public:
235 Decoder(ISA* isa = nullptr) : basePC(0), origPC(0), offset(0),
236 outOfBytes(true), instDone(false),
237 state(ResetState)
238 {
239 memset(&emi, 0, sizeof(emi));

--- 112 unchanged lines hidden ---