29 #ifndef __ARCH_GENERIC_TYPES_HH__ 30 #define __ARCH_GENERIC_TYPES_HH__ 46 #define ILLEGAL_ELEM_INDEX std::numeric_limits<ElemIndex>::max() 106 return _pc == opc.
_pc && _npc == opc.
_npc;
112 return !(*
this == opc);
138 template <
class MachInst>
171 return this->npc() != this->
pc() +
sizeof(
MachInst);
183 template <
class MachInst>
185 operator<<(std::ostream & os, const SimplePCState<MachInst> &
pc)
192 template <
class MachInst>
229 return this->npc() != this->
pc() +
sizeof(
MachInst) ||
230 this->nupc() != this->upc() + 1;
253 return Base::_pc == opc.
_pc &&
254 Base::_npc == opc.
_npc &&
261 return !(*
this == opc);
281 template <
class MachInst>
283 operator<<(std::ostream & os, const UPCState<MachInst> &
pc)
286 pc.pc(),
pc.npc(),
pc.upc(),
pc.nupc());
291 template <
class MachInst>
317 return !(this->nnpc() == this->npc() +
sizeof(
MachInst) &&
318 (this->npc() == this->
pc() +
sizeof(
MachInst) ||
319 this->npc() == this->
pc() + 2 *
sizeof(
MachInst)));
326 Base::_pc = Base::_npc;
334 return Base::_pc == opc.
_pc &&
335 Base::_npc == opc.
_npc &&
342 return !(*
this == opc);
360 template <
class MachInst>
362 operator<<(std::ostream & os, const DelaySlotPCState<MachInst> &
pc)
365 pc.pc(),
pc.npc(),
pc.nnpc());
370 template <
class MachInst>
407 return Base::branching() || this->nupc() != this->upc() + 1;
430 return Base::_pc == opc.
_pc &&
431 Base::_npc == opc.
_npc &&
432 Base::_nnpc == opc.
_nnpc &&
439 return !(*
this == opc);
459 template <
class MachInst>
461 operator<<(std::ostream & os, const DelaySlotUPCState<MachInst> &
pc)
464 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)