decoder.hh (11165:d90aec9435bd) | decoder.hh (11168:f98eb2da15a4) |
---|---|
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> | 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> |
|
35#include <vector> 36 37#include "arch/x86/regs/misc.hh" 38#include "arch/x86/types.hh" 39#include "base/bitfield.hh" 40#include "base/misc.hh" 41#include "base/trace.hh" 42#include "base/types.hh" --- 175 unchanged lines hidden (view full) --- 218 219 protected: 220 /// Caching for decoded instruction objects. 221 222 typedef MiscReg CacheKey; 223 224 typedef DecodeCache::AddrMap<Decoder::InstBytes> DecodePages; 225 DecodePages *decodePages; | 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; |
226 typedef m5::hash_map<CacheKey, DecodePages *> AddrCacheMap; | 227 typedef std::unordered_map<CacheKey, DecodePages *> AddrCacheMap; |
227 AddrCacheMap addrCacheMap; 228 229 DecodeCache::InstMap *instMap; | 228 AddrCacheMap addrCacheMap; 229 230 DecodeCache::InstMap *instMap; |
230 typedef m5::hash_map<CacheKey, DecodeCache::InstMap *> InstCacheMap; | 231 typedef std::unordered_map<CacheKey, DecodeCache::InstMap *> InstCacheMap; |
231 static InstCacheMap instCacheMap; 232 233 public: 234 Decoder(ISA* isa = nullptr) : basePC(0), origPC(0), offset(0), 235 outOfBytes(true), instDone(false), 236 state(ResetState) 237 { 238 memset(&emi, 0, sizeof(emi)); --- 112 unchanged lines hidden --- | 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 --- |