1/* 2 * Copyright (c) 2014 ARM Limited 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 --- 44 unchanged lines hidden (view full) --- 53 54class ThreadContext; 55 56namespace Trace { 57 58class InstRecord 59{ 60 protected: |
61 Tick when; 62 63 // The following fields are initialized by the constructor and 64 // thus guaranteed to be valid. 65 ThreadContext *thread; 66 // need to make this ref-counted so it doesn't go away before we 67 // dump the record 68 StaticInstPtr staticInst; --- 23 unchanged lines hidden (view full) --- 92 * since many instructions write multiple values (e.g. destintation 93 * register, flags, status, ...) This only captures the last write. 94 * @TODO fix this and record all destintations that an instruction writes 95 * @see data_status 96 */ 97 union { 98 uint64_t as_int; 99 double as_double; |
100 } data; 101 102 /** @defgroup fetch_seq 103 * This records the serial number that the instruction was fetched in. 104 * @see fetch_seq_valid 105 */ 106 InstSeqNum fetch_seq; 107 --- 7 unchanged lines hidden (view full) --- 115 * What size of data was written? 116 */ 117 enum { 118 DataInvalid = 0, 119 DataInt8 = 1, // set to equal number of bytes 120 DataInt16 = 2, 121 DataInt32 = 4, 122 DataInt64 = 8, |
123 DataDouble = 3 |
124 } data_status; 125 126 /** @ingroup memory 127 * Are the memory fields in the record valid? 128 */ 129 bool mem_valid; 130 131 /** @ingroup fetch_seq --- 36 unchanged lines hidden (view full) --- 168 void setData(uint8_t d) { data.as_int = d; data_status = DataInt8; } 169 170 void setData(int64_t d) { setData((uint64_t)d); } 171 void setData(int32_t d) { setData((uint32_t)d); } 172 void setData(int16_t d) { setData((uint16_t)d); } 173 void setData(int8_t d) { setData((uint8_t)d); } 174 175 void setData(double d) { data.as_double = d; data_status = DataDouble; } |
176 177 void setFetchSeq(InstSeqNum seq) 178 { fetch_seq = seq; fetch_seq_valid = true; } 179 180 void setCPSeq(InstSeqNum seq) 181 { cp_seq = seq; cp_seq_valid = true; } 182 183 void setPredicate(bool val) { predicate = val; } --- 9 unchanged lines hidden (view full) --- 193 194 Addr getAddr() const { return addr; } 195 Addr getSize() const { return size; } 196 unsigned getFlags() const { return flags; } 197 bool getMemValid() const { return mem_valid; } 198 199 uint64_t getIntData() const { return data.as_int; } 200 double getFloatData() const { return data.as_double; } |
201 int getDataStatus() const { return data_status; } 202 203 InstSeqNum getFetchSeq() const { return fetch_seq; } 204 bool getFetchSeqValid() const { return fetch_seq_valid; } 205 206 InstSeqNum getCpSeq() const { return cp_seq; } 207 bool getCpSeqValid() const { return cp_seq_valid; } 208}; --- 21 unchanged lines hidden --- |