31 #ifndef __ARCH_GENERIC_TYPES_HH__ 32 #define __ARCH_GENERIC_TYPES_HH__ 48 #define ILLEGAL_ELEM_INDEX std::numeric_limits<ElemIndex>::max() 108 return _pc == opc.
_pc && _npc == opc.
_npc;
114 return !(*
this == opc);
140 template <
class MachInst>
173 return this->npc() != this->
pc() +
sizeof(
MachInst);
185 template <
class MachInst>
187 operator<<(std::ostream & os, const SimplePCState<MachInst> &
pc)
194 template <
class MachInst>
231 return this->npc() != this->
pc() +
sizeof(
MachInst) ||
232 this->nupc() != this->upc() + 1;
255 return Base::_pc == opc.
_pc &&
256 Base::_npc == opc.
_npc &&
263 return !(*
this == opc);
283 template <
class MachInst>
285 operator<<(std::ostream & os, const UPCState<MachInst> &
pc)
288 pc.pc(),
pc.npc(),
pc.upc(),
pc.nupc());
293 template <
class MachInst>
319 return !(this->nnpc() == this->npc() +
sizeof(
MachInst) &&
320 (this->npc() == this->
pc() +
sizeof(
MachInst) ||
321 this->npc() == this->
pc() + 2 *
sizeof(
MachInst)));
328 Base::_pc = Base::_npc;
336 return Base::_pc == opc.
_pc &&
337 Base::_npc == opc.
_npc &&
344 return !(*
this == opc);
362 template <
class MachInst>
364 operator<<(std::ostream & os, const DelaySlotPCState<MachInst> &
pc)
367 pc.pc(),
pc.npc(),
pc.nnpc());
372 template <
class MachInst>
409 return Base::branching() || this->nupc() != this->upc() + 1;
432 return Base::_pc == opc.
_pc &&
433 Base::_npc == opc.
_npc &&
434 Base::_nnpc == opc.
_nnpc &&
441 return !(*
this == opc);
461 template <
class MachInst>
463 operator<<(std::ostream & os, const DelaySlotUPCState<MachInst> &
pc)
466 pc.pc(),
pc.npc(),
pc.nnpc(),
pc.upc(),
pc.nupc());
void ccprintf(cp::Print &print)
SimplePCState< MachInst > Base
Addr instAddr() const
Returns the memory address the bytes of this instruction came from.
MicroPC microPC() const
Returns the current micropc.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Addr nextInstAddr() const
Returns the memory address the bytes of the next instruction came from.
void serialize(CheckpointOut &cp) const override
Serialize an object.
bool operator==(const PCStateBase &opc) const
void serialize(CheckpointOut &cp) const override
Serialize an object.
DelaySlotPCState(Addr val)
#define UNSERIALIZE_SCALAR(scalar)
DelaySlotUPCState(Addr val)
bool operator!=(const PCStateBase &opc) const
DelaySlotPCState< MachInst > Base
void serialize(CheckpointOut &cp) const override
Serialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void serialize(const ThreadContext &tc, CheckpointOut &cp)
Thread context serialization helpers.
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Basic support for object serialization.
#define SERIALIZE_SCALAR(scalar)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::ostream CheckpointOut
uint16_t ElemIndex
Logical vector register elem index type.
SimplePCState< MachInst > Base
void unserialize(ThreadContext &tc, CheckpointIn &cp)