Deleted Added
sdiff udiff text old ( 8229:78bf55f23338 ) new ( 8541:27aaee8ec7cc )
full compact
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
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;

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

29 */
30
31#ifndef __CPU_STATIC_INST_HH__
32#define __CPU_STATIC_INST_HH__
33
34#include <bitset>
35#include <string>
36
37#include "arch/registers.hh"
38#include "arch/types.hh"
39#include "base/misc.hh"
40#include "base/refcnt.hh"
41#include "base/types.hh"
42#include "config/the_isa.hh"
43#include "cpu/op_class.hh"
44#include "sim/fault_fwd.hh"
45
46// forward declarations

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

58class InOrderDynInst;
59
60class CheckerCPU;
61class FastCPU;
62class AtomicSimpleCPU;
63class TimingSimpleCPU;
64class InorderCPU;
65class SymbolTable;
66
67namespace Trace {
68 class InstRecord;
69}
70
71/**
72 * Base, ISA-independent static instruction class.
73 *

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

277 *
278 * This class builds on StaticInstBase, defining fields and interfaces
279 * that are generic across all ISAs but that differ in details
280 * according to the specific ISA being used.
281 */
282class StaticInst : public StaticInstBase
283{
284 public:
285 /// Binary extended machine instruction type.
286 typedef TheISA::ExtMachInst ExtMachInst;
287 /// Logical register index type.
288 typedef TheISA::RegIndex RegIndex;
289
290 enum {
291 MaxInstSrcRegs = TheISA::MaxInstSrcRegs, //< Max source regs
292 MaxInstDestRegs = TheISA::MaxInstDestRegs, //< Max dest regs

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

405 * The default version of this function will call the internal
406 * virtual generateDisassembly() function to get the string,
407 * then cache it in #cachedDisassembly. If the disassembly
408 * should not be cached, this function should be overridden directly.
409 */
410 virtual const std::string &disassemble(Addr pc,
411 const SymbolTable *symtab = 0) const;
412
413 /// Return name of machine instruction
414 std::string getName() { return mnemonic; }
415};
416
417typedef RefCountingPtr<StaticInstBase> StaticInstBasePtr;
418
419/// Reference-counted pointer to a StaticInst object.
420/// This type should be used instead of "StaticInst *" so that
421/// StaticInst objects can be properly reference-counted.
422class StaticInstPtr : public RefCountingPtr<StaticInst>

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

435 }
436
437 /// Copy constructor.
438 StaticInstPtr(const StaticInstPtr &r)
439 : RefCountingPtr<StaticInst>(r)
440 {
441 }
442
443 /// Convert to pointer to StaticInstBase class.
444 operator const StaticInstBasePtr()
445 {
446 return this->get();
447 }
448};
449
450#endif // __CPU_STATIC_INST_HH__