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 --- 31 unchanged lines hidden (view full) --- 40#ifndef __ARCH_X86_TYPES_HH__ 41#define __ARCH_X86_TYPES_HH__ 42 43#include <iostream> 44 45#include "arch/generic/types.hh" 46#include "base/bitunion.hh" 47#include "base/cprintf.hh" |
48#include "base/types.hh" 49#include "sim/serialize.hh" 50 51namespace X86ISA 52{ 53 //This really determines how many bytes are passed to the decoder. 54 typedef uint64_t MachInst; 55 --- 284 unchanged lines hidden (view full) --- 340 { 341 Base::unserialize(cp); 342 UNSERIALIZE_SCALAR(_size); 343 } 344 }; 345 346} 347 |
348namespace std { |
349 template<> 350 struct hash<X86ISA::ExtMachInst> { 351 size_t operator()(const X86ISA::ExtMachInst &emi) const { 352 return (((uint64_t)emi.legacy << 40) | 353 ((uint64_t)emi.rex << 32) | 354 ((uint64_t)emi.modRM << 24) | 355 ((uint64_t)emi.sib << 16) | 356 ((uint64_t)emi.opcode.type << 8) | 357 ((uint64_t)emi.opcode.op)) ^ 358 emi.immediate ^ emi.displacement ^ 359 emi.mode ^ 360 emi.opSize ^ emi.addrSize ^ 361 emi.stackSize ^ emi.dispSize; 362 }; 363 }; |
364} |
365 366// These two functions allow ExtMachInst to be used with SERIALIZE_SCALAR 367// and UNSERIALIZE_SCALAR. 368template <> 369void 370paramOut(CheckpointOut &cp, const std::string &name, 371 const X86ISA::ExtMachInst &machInst); 372template <> 373void 374paramIn(CheckpointIn &cp, const std::string &name, 375 X86ISA::ExtMachInst &machInst); 376 377#endif // __ARCH_X86_TYPES_HH__ |