#include "base/bigint.hh"
#include "base/trace.hh"
+#include "base/types.hh"
#include "cpu/inst_seq.hh" // for InstSeqNum
#include "cpu/static_inst.hh"
-#include "sim/host.hh"
#include "sim/sim_object.hh"
class ThreadContext;
// need to make this ref-counted so it doesn't go away before we
// dump the record
StaticInstPtr staticInst;
- Addr PC;
+ TheISA::PCState pc;
StaticInstPtr macroStaticInst;
- MicroPC upc;
bool misspeculating;
+ bool predicate;
// The remaining fields are only valid for particular instruction
// types (e.g, addresses for memory ops) or when particular
public:
InstRecord(Tick _when, ThreadContext *_thread,
const StaticInstPtr _staticInst,
- Addr _pc, bool spec,
- const StaticInstPtr _macroStaticInst = NULL,
- MicroPC _upc = 0)
+ TheISA::PCState _pc, bool spec,
+ const StaticInstPtr _macroStaticInst = NULL)
: when(_when), thread(_thread),
- staticInst(_staticInst), PC(_pc),
- macroStaticInst(_macroStaticInst), upc(_upc),
- misspeculating(spec)
+ staticInst(_staticInst), pc(_pc),
+ macroStaticInst(_macroStaticInst),
+ misspeculating(spec), predicate(true)
{
data_status = DataInvalid;
addr_valid = false;
void setCPSeq(InstSeqNum seq)
{ cp_seq = seq; cp_seq_valid = true; }
+ void setPredicate(bool val) { predicate = val; }
+
virtual void dump() = 0;
+
+ public:
+ Tick getWhen() { return when; }
+ ThreadContext *getThread() { return thread; }
+ StaticInstPtr getStaticInst() { return staticInst; }
+ TheISA::PCState getPCState() { return pc; }
+ StaticInstPtr getMacroStaticInst() { return macroStaticInst; }
+ bool getMisspeculating() { return misspeculating; }
+
+ Addr getAddr() { return addr; }
+ bool getAddrValid() { return addr_valid; }
+
+ uint64_t getIntData() { return data.as_int; }
+ double getFloatData() { return data.as_double; }
+ int getDataStatus() { return data_status; }
+
+ InstSeqNum getFetchSeq() { return fetch_seq; }
+ bool getFetchSeqValid() { return fetch_seq_valid; }
+
+ InstSeqNum getCpSeq() { return cp_seq; }
+ bool getCpSeqValid() { return cp_seq_valid; }
};
class InstTracer : public SimObject
virtual InstRecord *
getInstRecord(Tick when, ThreadContext *tc,
- const StaticInstPtr staticInst, Addr pc,
- const StaticInstPtr macroStaticInst = NULL,
- MicroPC _upc = 0) = 0;
+ const StaticInstPtr staticInst, TheISA::PCState pc,
+ const StaticInstPtr macroStaticInst = NULL) = 0;
};
-}; // namespace Trace
+} // namespace Trace
#endif // __INSTRECORD_HH__