gem5 v24.0.0.0
Loading...
Searching...
No Matches
dyn_inst.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010, 2016, 2021 ARM Limited
3 * Copyright (c) 2013 Advanced Micro Devices, Inc.
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating
9 * to a hardware implementation of the functionality of the software
10 * licensed hereunder. You may use the software subject to the license
11 * terms below provided that you ensure that this notice is replicated
12 * unmodified and in its entirety in all distributions of the software,
13 * modified or unmodified, in source code or in binary form.
14 *
15 * Copyright (c) 2004-2006 The Regents of The University of Michigan
16 * All rights reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions are
20 * met: redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer;
22 * redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution;
25 * neither the name of the copyright holders nor the names of its
26 * contributors may be used to endorse or promote products derived from
27 * this software without specific prior written permission.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 */
41
42#ifndef __CPU_O3_DYN_INST_HH__
43#define __CPU_O3_DYN_INST_HH__
44
45#include <algorithm>
46#include <array>
47#include <deque>
48#include <list>
49#include <string>
50
51#include "base/refcnt.hh"
52#include "base/trace.hh"
53#include "cpu/checker/cpu.hh"
54#include "cpu/exec_context.hh"
55#include "cpu/exetrace.hh"
56#include "cpu/inst_res.hh"
57#include "cpu/inst_seq.hh"
58#include "cpu/o3/cpu.hh"
60#include "cpu/o3/lsq_unit.hh"
61#include "cpu/op_class.hh"
62#include "cpu/reg_class.hh"
63#include "cpu/static_inst.hh"
64#include "cpu/translation.hh"
65#include "debug/HtmCpu.hh"
66
67namespace gem5
68{
69
70class Packet;
71
72namespace o3
73{
74
75class DynInst : public ExecContext, public RefCounted
76{
77 private:
79 InstSeqNum seq_num, CPU *cpu);
80
81 public:
82 // The list of instructions iterator type.
84
96
97 static void *operator new(size_t count, Arrays &arrays);
98 static void operator delete(void* ptr);
99
101 DynInst(const Arrays &arrays, const StaticInstPtr &staticInst,
102 const StaticInstPtr &macroop, InstSeqNum seq_num, CPU *cpu);
103
104 DynInst(const Arrays &arrays, const StaticInstPtr &staticInst,
105 const StaticInstPtr &macroop, const PCStateBase &pc,
106 const PCStateBase &pred_pc, InstSeqNum seq_num, CPU *cpu);
107
109 DynInst(const Arrays &arrays, const StaticInstPtr &_staticInst,
110 const StaticInstPtr &_macroop);
111
112 ~DynInst();
113
115 Fault execute();
116
119
122
125
128
130 CPU *cpu = nullptr;
131
132 BaseCPU *getCpuPtr() { return cpu; }
133
135 ThreadState *thread = nullptr;
136
139
142
143 protected:
173
192
193 private:
194 /* An amalgamation of a lot of boolean values into one */
195 std::bitset<MaxFlags> instFlags;
196
198 std::bitset<NumStatus> status;
199
200 protected:
204 std::queue<InstResult> instResult;
205
207 std::unique_ptr<PCStateBase> pc;
208
211
217
218 size_t _numSrcs;
219 size_t _numDests;
220
221 // Flattened register index of the destination registers of this
222 // instruction.
224
225 // Physical register index of the destination registers of this
226 // instruction.
228
229 // Physical register index of the previous producers of the
230 // architected destinations.
232
233 // Physical register index of the source registers of this instruction.
235
236 // Whether or not the source register is ready, one bit per register.
237 uint8_t *_readySrcIdx;
238
239 public:
240 size_t numSrcs() const { return _numSrcs; }
241 size_t numDests() const { return _numDests; }
242
243 // Returns the flattened register index of the idx'th destination
244 // register.
245 const RegId &
246 flattenedDestIdx(int idx) const
247 {
248 return _flatDestIdx[idx];
249 }
250
251 // Flattens a destination architectural register index into a logical
252 // index.
253 void
254 flattenedDestIdx(int idx, const RegId &reg_id)
255 {
256 _flatDestIdx[idx] = reg_id;
257 }
258
259 // Returns the physical register index of the idx'th destination
260 // register.
262 renamedDestIdx(int idx) const
263 {
264 return _destIdx[idx];
265 }
266
267 // Set the renamed dest register id.
268 void
269 renamedDestIdx(int idx, PhysRegIdPtr phys_reg_id)
270 {
271 _destIdx[idx] = phys_reg_id;
272 }
273
274 // Returns the physical register index of the previous physical
275 // register that remapped to the same logical register index.
277 prevDestIdx(int idx) const
278 {
279 return _prevDestIdx[idx];
280 }
281
282 // Set the previous renamed dest register id.
283 void
284 prevDestIdx(int idx, PhysRegIdPtr phys_reg_id)
285 {
286 _prevDestIdx[idx] = phys_reg_id;
287 }
288
289 // Returns the physical register index of the i'th source register.
291 renamedSrcIdx(int idx) const
292 {
293 return _srcIdx[idx];
294 }
295
296 void
297 renamedSrcIdx(int idx, PhysRegIdPtr phys_reg_id)
298 {
299 _srcIdx[idx] = phys_reg_id;
300 }
301
302 bool
303 readySrcIdx(int idx) const
304 {
305 uint8_t &byte = _readySrcIdx[idx / 8];
306 return bits(byte, idx % 8);
307 }
308
309 void
310 readySrcIdx(int idx, bool ready)
311 {
312 uint8_t &byte = _readySrcIdx[idx / 8];
313 replaceBits(byte, idx % 8, ready ? 1 : 0);
314 }
315
318
321
323
324 std::unique_ptr<PCStateBase> predPC;
325
328
330 uint8_t readyRegs = 0;
331
332 public:
334
336
339
341 unsigned memReqFlags = 0;
342
344 unsigned effSize;
345
347 uint8_t *memData = nullptr;
348
350 ssize_t lqIdx = -1;
352
354 ssize_t sqIdx = -1;
356
357
359
364
366 // Need a copy of main request pointer to verify on writes.
368
369 public:
372
374 bool effAddrValid() const { return instFlags[EffAddrValid]; }
376
378 bool memOpDone() const { return instFlags[MemOpDone]; }
379 void memOpDone(bool f) { instFlags[MemOpDone] = f; }
380
381 bool notAnInst() const { return instFlags[NotAnInst]; }
382 void setNotAnInst() { instFlags[NotAnInst] = true; }
383
384
386 //
387 // INSTRUCTION EXECUTION
388 //
390
391 void
392 demapPage(Addr vaddr, uint64_t asn) override
393 {
394 cpu->demapPage(vaddr, asn);
395 }
396
398 const std::vector<bool> &byte_enable) override;
399
401
402 Fault writeMem(uint8_t *data, unsigned size, Addr addr,
403 Request::Flags flags, uint64_t *res,
404 const std::vector<bool> &byte_enable) override;
405
407 AtomicOpFunctorPtr amo_op) override;
408
412
414 bool
416 {
418 }
420
426 bool
428 {
430 }
431 void
436
443
448 bool
450 {
452 }
453
454 public:
455#ifdef GEM5_DEBUG
456 void dumpSNList();
457#endif
458
462 void
463 renameDestReg(int idx, PhysRegIdPtr renamed_dest,
464 PhysRegIdPtr previous_rename)
465 {
466 renamedDestIdx(idx, renamed_dest);
467 prevDestIdx(idx, previous_rename);
468 if (renamed_dest->isPinned())
470 }
471
476 void
477 renameSrcReg(int idx, PhysRegIdPtr renamed_src)
478 {
479 renamedSrcIdx(idx, renamed_src);
480 }
481
483 void dump();
484
486 void dump(std::string &outstring);
487
489 int cpuId() const { return cpu->cpuId(); }
490
492 uint32_t socketId() const { return cpu->socketId(); }
493
496
498 ContextID contextId() const { return thread->contextId(); }
499
501 Fault getFault() const { return fault; }
504 Fault& getFault() { return fault; }
505
511 bool doneTargCalc() { return false; }
512
514 void setPredTarg(const PCStateBase &pred_pc) { set(predPC, pred_pc); }
515
516 const PCStateBase &readPredTarg() { return *predPC; }
517
520
521 void
522 setPredTaken(bool predicted_taken)
523 {
524 instFlags[PredTaken] = predicted_taken;
525 }
526
528 bool
530 {
531 std::unique_ptr<PCStateBase> next_pc(pc->clone());
532 staticInst->advancePC(*next_pc);
533 return *next_pc != *predPC;
534 }
535
536 //
537 // Instruction types. Forward checks to StaticInst object.
538 //
539 bool isNop() const { return staticInst->isNop(); }
540 bool isMemRef() const { return staticInst->isMemRef(); }
541 bool isLoad() const { return staticInst->isLoad(); }
542 bool isStore() const { return staticInst->isStore(); }
543 bool isAtomic() const { return staticInst->isAtomic(); }
545 { return staticInst->isStoreConditional(); }
546 bool isInstPrefetch() const { return staticInst->isInstPrefetch(); }
547 bool isDataPrefetch() const { return staticInst->isDataPrefetch(); }
548 bool isInteger() const { return staticInst->isInteger(); }
549 bool isFloating() const { return staticInst->isFloating(); }
550 bool isVector() const { return staticInst->isVector(); }
551 bool isControl() const { return staticInst->isControl(); }
552 bool isCall() const { return staticInst->isCall(); }
553 bool isReturn() const { return staticInst->isReturn(); }
554 bool isDirectCtrl() const { return staticInst->isDirectCtrl(); }
555 bool isIndirectCtrl() const { return staticInst->isIndirectCtrl(); }
556 bool isCondCtrl() const { return staticInst->isCondCtrl(); }
557 bool isUncondCtrl() const { return staticInst->isUncondCtrl(); }
558 bool isSerializing() const { return staticInst->isSerializing(); }
559 bool
564 bool
566 {
568 }
569 bool isSquashAfter() const { return staticInst->isSquashAfter(); }
570 bool isFullMemBarrier() const { return staticInst->isFullMemBarrier(); }
571 bool isReadBarrier() const { return staticInst->isReadBarrier(); }
572 bool isWriteBarrier() const { return staticInst->isWriteBarrier(); }
573 bool isNonSpeculative() const { return staticInst->isNonSpeculative(); }
574 bool isQuiesce() const { return staticInst->isQuiesce(); }
575 bool isUnverifiable() const { return staticInst->isUnverifiable(); }
576 bool isSyscall() const { return staticInst->isSyscall(); }
577 bool isMacroop() const { return staticInst->isMacroop(); }
578 bool isMicroop() const { return staticInst->isMicroop(); }
579 bool isDelayedCommit() const { return staticInst->isDelayedCommit(); }
580 bool isLastMicroop() const { return staticInst->isLastMicroop(); }
581 bool isFirstMicroop() const { return staticInst->isFirstMicroop(); }
582 // hardware transactional memory
583 bool isHtmStart() const { return staticInst->isHtmStart(); }
584 bool isHtmStop() const { return staticInst->isHtmStop(); }
585 bool isHtmCancel() const { return staticInst->isHtmCancel(); }
586 bool isHtmCmd() const { return staticInst->isHtmCmd(); }
587
588 uint64_t
589 getHtmTransactionUid() const override
590 {
592 return htmUid;
593 }
594
595 uint64_t
596 newHtmTransactionUid() const override
597 {
598 panic("Not yet implemented\n");
599 return 0;
600 }
601
602 bool
603 inHtmTransactionalState() const override
604 {
606 }
607
608 uint64_t
610 {
612 return htmDepth;
613 else
614 return 0;
615 }
616
617 void
618 setHtmTransactionalState(uint64_t htm_uid, uint64_t htm_depth)
619 {
621 htmUid = htm_uid;
622 htmDepth = htm_depth;
623 }
624
625 void
627 {
629 DPRINTF(HtmCpu,
630 "clearing instuction's transactional state htmUid=%u\n",
632
634 htmUid = -1;
635 htmDepth = 0;
636 }
637 }
638
641
644
647
650
653
656
659
666
668 OpClass opClass() const { return staticInst->opClass(); }
669
671 std::unique_ptr<PCStateBase>
673 {
674 return staticInst->branchTarget(*pc);
675 }
676
678 size_t numSrcRegs() const { return numSrcs(); }
679
681 size_t numDestRegs() const { return numDests(); }
682
683 size_t
685 {
686 return staticInst->numDestRegs(type);
687 }
688
690 const RegId& destRegIdx(int i) const { return staticInst->destRegIdx(i); }
691
693 const RegId& srcRegIdx(int i) const { return staticInst->srcRegIdx(i); }
694
696 uint8_t resultSize() { return instResult.size(); }
697
703 {
704 if (!instResult.empty()) {
705 InstResult t = instResult.front();
706 instResult.pop();
707 return t;
708 }
709 return dflt;
710 }
711
714 template<typename T>
715 void
716 setResult(const RegClass &reg_class, T &&t)
717 {
718 if (instFlags[RecordResult]) {
719 instResult.emplace(reg_class, std::forward<T>(t));
720 }
721 }
725 void markSrcRegReady();
726
728 void markSrcRegReady(RegIndex src_idx);
729
732
734 bool isCompleted() const { return status[Completed]; }
735
738
740 bool isResultReady() const { return status[ResultReady]; }
741
743 void setCanIssue() { status.set(CanIssue); }
744
746 bool readyToIssue() const { return status[CanIssue]; }
747
749 void clearCanIssue() { status.reset(CanIssue); }
750
752 void setIssued() { status.set(Issued); }
753
755 bool isIssued() const { return status[Issued]; }
756
758 void clearIssued() { status.reset(Issued); }
759
761 void setExecuted() { status.set(Executed); }
762
764 bool isExecuted() const { return status[Executed]; }
765
768
770 void clearCanCommit() { status.reset(CanCommit); }
771
773 bool readyToCommit() const { return status[CanCommit]; }
774
775 void setAtCommit() { status.set(AtCommit); }
776
777 bool isAtCommit() { return status[AtCommit]; }
778
781
783 bool isCommitted() const { return status[Committed]; }
784
786 void setSquashed();
787
789 bool isSquashed() const { return status[Squashed]; }
790
791 //Instruction Queue Entry
792 //-----------------------
794 void setInIQ() { status.set(IqEntry); }
795
797 void clearInIQ() { status.reset(IqEntry); }
798
800 bool isInIQ() const { return status[IqEntry]; }
801
804
806 bool isSquashedInIQ() const { return status[SquashedInIQ]; }
807
808
809 //Load / Store Queue Functions
810 //-----------------------
812 void setInLSQ() { status.set(LsqEntry); }
813
815 void removeInLSQ() { status.reset(LsqEntry); }
816
818 bool isInLSQ() const { return status[LsqEntry]; }
819
822
824 bool isSquashedInLSQ() const { return status[SquashedInLSQ]; }
825
826
827 //Reorder Buffer Functions
828 //-----------------------
830 void setInROB() { status.set(RobEntry); }
831
833 void clearInROB() { status.reset(RobEntry); }
834
836 bool isInROB() const { return status[RobEntry]; }
837
840
842 bool isSquashedInROB() const { return status[SquashedInROB]; }
843
846
848 void
855
858
860 void
867
869 bool
871 {
873 }
874
876 void
882
884 const PCStateBase &
885 pcState() const override
886 {
887 return *pc;
888 }
889
891 void pcState(const PCStateBase &val) override { set(pc, val); }
892
893 bool readPredicate() const override { return instFlags[Predicate]; }
894
895 void
896 setPredicate(bool val) override
897 {
899
900 if (traceData) {
902 }
903 }
904
905 bool
906 readMemAccPredicate() const override
907 {
909 }
910
911 void
912 setMemAccPredicate(bool val) override
913 {
915 }
916
918 void setTid(ThreadID tid) { threadNumber = tid; }
919
922
924 gem5::ThreadContext *tcBase() const override { return thread->getTC(); }
925
926 public:
930
932 bool hasRequest() const { return instFlags[ReqMade]; }
934 void setRequest() { instFlags[ReqMade] = true; }
935
938
940 void setInstListIt(ListIt _instListIt) { instListIt = _instListIt; }
941
942 public:
944 unsigned int
945 readStCondFailures() const override
946 {
948 }
949
951 void
952 setStCondFailures(unsigned int sc_failures) override
953 {
954 thread->storeCondFailures = sc_failures;
955 }
956
957 public:
958 // monitor/mwait funtions
959 void
960 armMonitor(Addr address) override
961 {
962 cpu->armMonitor(threadNumber, address);
963 }
964 bool
965 mwait(PacketPtr pkt) override
966 {
967 return cpu->mwait(threadNumber, pkt);
968 }
969 void
971 {
972 return cpu->mwaitAtomic(threadNumber, tc, cpu->mmu);
973 }
975 getAddrMonitor() override
976 {
978 }
979
980 private:
981 // hardware transactional memory
982 uint64_t htmUid = -1;
983 uint64_t htmDepth = 0;
984
985 public:
986#if TRACING_ON
987 // Value -1 indicates that particular phase
988 // hasn't happened (yet).
990 Tick fetchTick = -1; // instruction fetch is completed.
991 int32_t decodeTick = -1; // instruction enters decode phase
992 int32_t renameTick = -1; // instruction enters rename phase
993 int32_t dispatchTick = -1;
994 int32_t issueTick = -1;
995 int32_t completeTick = -1;
996 int32_t commitTick = -1;
997 int32_t storeTick = -1;
998#endif
999
1000 /* Values used by LoadToUse stat */
1003
1007 RegVal
1008 readMiscReg(int misc_reg) override
1009 {
1010 return cpu->readMiscReg(misc_reg, threadNumber);
1011 }
1012
1016 void
1017 setMiscReg(int misc_reg, RegVal val) override
1018 {
1025 for (auto &idx: _destMiscRegIdx) {
1026 if (idx == misc_reg)
1027 return;
1028 }
1029
1030 _destMiscRegIdx.push_back(misc_reg);
1031 _destMiscRegVal.push_back(val);
1032 }
1033
1037 RegVal
1038 readMiscRegOperand(const StaticInst *si, int idx) override
1039 {
1040 const RegId& reg = si->srcRegIdx(idx);
1041 assert(reg.is(MiscRegClass));
1042 return cpu->readMiscReg(reg.index(), threadNumber);
1043 }
1044
1048 void
1049 setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
1050 {
1051 const RegId& reg = si->destRegIdx(idx);
1052 assert(reg.is(MiscRegClass));
1053 setMiscReg(reg.index(), val);
1054 }
1055
1057 void
1059 {
1060 // @todo: Pretty convoluted way to avoid squashing from happening when
1061 // using the TC during an instruction's execution (specifically for
1062 // instructions that have side-effects that use the TC). Fix this.
1063 // See cpu/o3/dyn_inst_impl.hh.
1064 bool no_squash_from_TC = thread->noSquashFromTC;
1065 thread->noSquashFromTC = true;
1066
1067 for (int i = 0; i < _destMiscRegIdx.size(); i++)
1068 cpu->setMiscReg(
1070
1071 thread->noSquashFromTC = no_squash_from_TC;
1072 }
1073
1074 void
1076 {
1077
1078 for (int idx = 0; idx < numDestRegs(); idx++) {
1079 PhysRegIdPtr prev_phys_reg = prevDestIdx(idx);
1080 const RegId& original_dest_reg = staticInst->destRegIdx(idx);
1081 const auto bytes = original_dest_reg.regClass().regBytes();
1082
1083 // Registers which aren't renamed don't need to be forwarded.
1084 if (!original_dest_reg.isRenameable())
1085 continue;
1086
1087 if (bytes == sizeof(RegVal)) {
1089 cpu->getReg(prev_phys_reg, threadNumber));
1090 } else {
1091 uint8_t val[original_dest_reg.regClass().regBytes()];
1092 cpu->getReg(prev_phys_reg, val, threadNumber);
1094 }
1095 }
1096 }
1098 void trap(const Fault &fault);
1099
1100 public:
1101
1102 // The register accessor methods provide the index of the
1103 // instruction's operand (e.g., 0 or 1), not the architectural
1104 // register index, to simplify the implementation of register
1105 // renaming. We find the architectural register index by indexing
1106 // into the instruction's own operand index table. Note that a
1107 // raw pointer to the StaticInst is provided instead of a
1108 // ref-counted StaticInstPtr to redice overhead. This is fine as
1109 // long as these methods don't copy the pointer into any long-term
1110 // storage (which is pretty hard to imagine they would have reason
1111 // to do).
1112
1113 RegVal
1114 getRegOperand(const StaticInst *si, int idx) override
1115 {
1116 const PhysRegIdPtr reg = renamedSrcIdx(idx);
1117 if (reg->is(InvalidRegClass))
1118 return 0;
1119 return cpu->getReg(reg, threadNumber);
1120 }
1121
1122 void
1123 getRegOperand(const StaticInst *si, int idx, void *val) override
1124 {
1125 const PhysRegIdPtr reg = renamedSrcIdx(idx);
1126 if (reg->is(InvalidRegClass))
1127 return;
1129 }
1130
1131 void *
1132 getWritableRegOperand(const StaticInst *si, int idx) override
1133 {
1135 }
1136
1140 void
1141 setRegOperand(const StaticInst *si, int idx, RegVal val) override
1142 {
1143 const PhysRegIdPtr reg = renamedDestIdx(idx);
1144 if (reg->is(InvalidRegClass))
1145 return;
1147 setResult(reg->regClass(), val);
1148 }
1149
1150 void
1151 setRegOperand(const StaticInst *si, int idx, const void *val) override
1152 {
1153 const PhysRegIdPtr reg = renamedDestIdx(idx);
1154 if (reg->is(InvalidRegClass))
1155 return;
1157 setResult(reg->regClass(), val);
1158 }
1159};
1160
1161} // namespace o3
1162} // namespace gem5
1163
1164#endif // __CPU_O3_DYN_INST_HH__
#define DPRINTF(x,...)
Definition trace.hh:210
const char data[]
RequestorID dataRequestorId() const
Reads this CPU's unique data requestor ID.
Definition base.hh:193
uint32_t socketId() const
Reads this CPU's Socket ID.
Definition base.hh:190
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseMMU *mmu)
Definition base.cc:277
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
Definition base.hh:656
bool mwait(ThreadID tid, PacketPtr pkt)
Definition base.cc:254
int cpuId() const
Reads this CPU's ID.
Definition base.hh:187
void armMonitor(ThreadID tid, Addr address)
Definition base.cc:242
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
Physical register ID.
Definition reg_class.hh:415
bool isPinned() const
Definition reg_class.hh:492
Derive from RefCounted if you want to enable reference counting of this class.
Definition refcnt.hh:61
T * get() const
Directly access the pointer itself without taking a reference.
Definition refcnt.hh:227
constexpr size_t regBytes() const
Definition reg_class.hh:239
Register ID: describe an architectural register with its class and index.
Definition reg_class.hh:94
constexpr bool isRenameable() const
Return true if this register can be renamed.
Definition reg_class.hh:141
constexpr const RegClass & regClass() const
Class accessor.
Definition reg_class.hh:154
Base, ISA-independent static instruction class.
bool isInteger() const
bool isQuiesce() const
bool isHtmStop() const
bool isUnverifiable() const
OpClass opClass() const
Operation class. Used to select appropriate function unit in issue.
bool isSyscall() const
bool isStoreConditional() const
bool isFirstMicroop() const
bool isDirectCtrl() const
bool isHtmCmd() const
bool isUncondCtrl() const
bool isSerializeBefore() const
bool isLoad() const
virtual std::unique_ptr< PCStateBase > branchTarget(const PCStateBase &pc) const
Return the target address for a PC-relative branch.
bool isSquashAfter() const
uint8_t numDestRegs() const
Number of destination registers.
virtual void advancePC(PCStateBase &pc_state) const =0
bool isHtmCancel() const
bool isFloating() const
bool isWriteBarrier() const
bool isNop() const
bool isMacroop() const
bool isReturn() const
bool isMemRef() const
bool isReadBarrier() const
bool isNonSpeculative() const
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
bool isDataPrefetch() const
bool isIndirectCtrl() const
bool isVector() const
bool isHtmStart() const
bool isLastMicroop() const
bool isFullMemBarrier() const
bool isStore() const
bool isInstPrefetch() const
bool isSerializing() const
bool isAtomic() const
bool isMicroop() const
bool isCall() const
const RegId & srcRegIdx(int i) const
Return logical index (architectural reg num) of i'th source reg.
bool isCondCtrl() const
bool isDelayedCommit() const
bool isControl() const
bool isSerializeAfter() const
ThreadContext is the external interface to all thread state for anything outside of the CPU.
O3CPU class, has each of the stages (fetch through commit) within it, as well as all of the time buff...
Definition cpu.hh:94
RegVal getReg(PhysRegIdPtr phys_reg, ThreadID tid)
Definition cpu.cc:954
void setMiscReg(int misc_reg, RegVal val, ThreadID tid)
Sets a misc.
Definition cpu.cc:947
void demapPage(Addr vaddr, uint64_t asn)
Definition cpu.hh:183
BaseMMU * mmu
Definition cpu.hh:110
void setReg(PhysRegIdPtr phys_reg, RegVal val, ThreadID tid)
Definition cpu.cc:1022
RegVal readMiscReg(int misc_reg, ThreadID tid)
Reads a misc.
Definition cpu.cc:934
void * getWritableReg(PhysRegIdPtr phys_reg, ThreadID tid)
Definition cpu.cc:1006
bool hasRequest() const
Has this instruction generated a memory request.
Definition dyn_inst.hh:932
std::list< DynInstPtr >::iterator ListIt
Definition dyn_inst.hh:83
bool isCompleted() const
Returns whether or not this instruction is completed.
Definition dyn_inst.hh:734
const RegId & flattenedDestIdx(int idx) const
Definition dyn_inst.hh:246
uint8_t readyRegs
How many source registers are ready.
Definition dyn_inst.hh:330
uint8_t * memData
Pointer to the data for the memory access.
Definition dyn_inst.hh:347
RequestorID requestorId() const
Read this CPU's data requestor ID.
Definition dyn_inst.hh:495
bool isStoreConditional() const
Definition dyn_inst.hh:544
unsigned memReqFlags
The memory request flags (from translation).
Definition dyn_inst.hh:341
bool isDirectCtrl() const
Definition dyn_inst.hh:554
bool isMicroop() const
Definition dyn_inst.hh:578
size_t numDestRegs(RegClassType type) const
Definition dyn_inst.hh:684
RequestPtr reqToVerify
Definition dyn_inst.hh:367
bool isHtmStart() const
Definition dyn_inst.hh:583
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
Reads a misc.
Definition dyn_inst.hh:1038
bool isCondCtrl() const
Definition dyn_inst.hh:556
void memOpDone(bool f)
Definition dyn_inst.hh:379
bool isSquashAfter() const
Definition dyn_inst.hh:569
bool doneTargCalc()
Checks whether or not this instruction has had its branch target calculated yet.
Definition dyn_inst.hh:511
void setIssued()
Sets this instruction as issued from the IQ.
Definition dyn_inst.hh:752
ThreadState * thread
Pointer to the thread state.
Definition dyn_inst.hh:135
bool isIndirectCtrl() const
Definition dyn_inst.hh:555
void clearCanIssue()
Clears this instruction being able to issue.
Definition dyn_inst.hh:749
void clearSerializeAfter()
Clears the serializeAfter part of this instruction.
Definition dyn_inst.hh:652
PhysRegIdPtr * _prevDestIdx
Definition dyn_inst.hh:231
std::unique_ptr< PCStateBase > predPC
Predicted PC state after this instruction.
Definition dyn_inst.hh:324
bool isUncondCtrl() const
Definition dyn_inst.hh:557
unsigned effSize
The size of the request.
Definition dyn_inst.hh:344
RegId * _flatDestIdx
Definition dyn_inst.hh:223
BaseCPU * getCpuPtr()
Definition dyn_inst.hh:132
Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable) override
Definition dyn_inst.cc:432
uint8_t * _readySrcIdx
Definition dyn_inst.hh:237
void clearInIQ()
Sets this instruction as a entry the IQ.
Definition dyn_inst.hh:797
void setSerializeBefore()
Temporarily sets this instruction as a serialize before instruction.
Definition dyn_inst.hh:640
void clearHtmTransactionalState()
Definition dyn_inst.hh:626
void setTid(ThreadID tid)
Sets the thread id.
Definition dyn_inst.hh:918
bool readyToIssue() const
Returns whether or not this instruction is ready to issue.
Definition dyn_inst.hh:746
void translationCompleted(bool f)
Definition dyn_inst.hh:419
bool isLoad() const
Definition dyn_inst.hh:541
uint64_t htmDepth
Definition dyn_inst.hh:983
@ LsqEntry
Instruction is in the ROB.
Definition dyn_inst.hh:148
@ ThreadsyncWait
Is a blocking instruction.
Definition dyn_inst.hh:166
@ Committed
Instruction has reached commit.
Definition dyn_inst.hh:156
@ Completed
Instruction is in the LSQ.
Definition dyn_inst.hh:149
@ SerializeHandled
Needs to serialize instructions behind it.
Definition dyn_inst.hh:170
@ PinnedRegsRenamed
Instruction is squashed in the ROB.
Definition dyn_inst.hh:161
@ NumStatus
Serialization has been handled.
Definition dyn_inst.hh:171
@ Squashed
Instruction has committed.
Definition dyn_inst.hh:157
@ PinnedRegsWritten
Pinned registers are renamed.
Definition dyn_inst.hh:162
@ Executed
Instruction has issued.
Definition dyn_inst.hh:153
@ SerializeBefore
Is a thread synchronization instruction.
Definition dyn_inst.hh:167
@ SerializeAfter
Needs to serialize on instructions ahead of it.
Definition dyn_inst.hh:169
@ PinnedRegsSquashDone
Pinned registers are written back.
Definition dyn_inst.hh:163
@ CanCommit
Instruction has executed.
Definition dyn_inst.hh:154
@ Issued
Instruction can issue and execute.
Definition dyn_inst.hh:152
@ BlockingInst
Is a recover instruction.
Definition dyn_inst.hh:165
@ SquashedInLSQ
Instruction is squashed in the IQ.
Definition dyn_inst.hh:159
@ AtCommit
Instruction can commit.
Definition dyn_inst.hh:155
@ SquashedInIQ
Instruction is squashed.
Definition dyn_inst.hh:158
@ CanIssue
Instruction has its result.
Definition dyn_inst.hh:151
@ SquashedInROB
Instruction is squashed in the LSQ.
Definition dyn_inst.hh:160
@ RecoverInst
Regs pinning status updated after squash.
Definition dyn_inst.hh:164
@ RobEntry
Instruction is in the IQ.
Definition dyn_inst.hh:147
@ ResultReady
Instruction has completed.
Definition dyn_inst.hh:150
void renamedSrcIdx(int idx, PhysRegIdPtr phys_reg_id)
Definition dyn_inst.hh:297
Fault completeAcc(PacketPtr pkt)
Completes the access.
Definition dyn_inst.cc:382
Fault fault
The kind of fault this instruction has generated.
Definition dyn_inst.hh:138
std::vector< short > _destMiscRegIdx
Indexes of the destination misc.
Definition dyn_inst.hh:216
void setResult(const RegClass &reg_class, T &&t)
Pushes a result onto the instResult queue.
Definition dyn_inst.hh:716
bool isMemRef() const
Definition dyn_inst.hh:540
ssize_t lqIdx
Load queue index.
Definition dyn_inst.hh:350
bool strictlyOrdered() const
Is this instruction's memory access strictly ordered?
Definition dyn_inst.hh:928
bool readPredicate() const override
Definition dyn_inst.hh:893
void getRegOperand(const StaticInst *si, int idx, void *val) override
Definition dyn_inst.hh:1123
bool isFirstMicroop() const
Definition dyn_inst.hh:581
bool isInstPrefetch() const
Definition dyn_inst.hh:546
std::unique_ptr< PCStateBase > pc
PC state for this instruction.
Definition dyn_inst.hh:207
ThreadID threadNumber
The thread this instruction is from.
Definition dyn_inst.hh:317
std::bitset< MaxFlags > instFlags
Definition dyn_inst.hh:195
void setThreadState(ThreadState *state)
Sets the pointer to the thread state.
Definition dyn_inst.hh:921
bool readySrcIdx(int idx) const
Definition dyn_inst.hh:303
LSQ::LSQRequest * savedRequest
Saved memory request (needed when the DTB address translation is delayed due to a hw page table walk)...
Definition dyn_inst.hh:363
void setRegOperand(const StaticInst *si, int idx, const void *val) override
Definition dyn_inst.hh:1151
bool isDataPrefetch() const
Definition dyn_inst.hh:547
bool isSquashedInROB() const
Returns whether or not this instruction is squashed in the ROB.
Definition dyn_inst.hh:842
RegVal readMiscReg(int misc_reg) override
Reads a misc.
Definition dyn_inst.hh:1008
void updateMiscRegs()
Called at the commit stage to update the misc.
Definition dyn_inst.hh:1058
bool isPinnedRegsRenamed() const
Returns whether pinned registers are renamed.
Definition dyn_inst.hh:845
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
Definition dyn_inst.hh:952
bool isReadBarrier() const
Definition dyn_inst.hh:571
void strictlyOrdered(bool so)
Definition dyn_inst.hh:929
bool isLastMicroop() const
Definition dyn_inst.hh:580
Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
Definition dyn_inst.cc:444
RegVal getRegOperand(const StaticInst *si, int idx) override
Definition dyn_inst.hh:1114
ListIt & getInstListIt()
Returns iterator to this instruction in the list of all insts.
Definition dyn_inst.hh:937
ContextID contextId() const
Read this context's system-wide ID.
Definition dyn_inst.hh:498
PhysRegIdPtr renamedSrcIdx(int idx) const
Definition dyn_inst.hh:291
void mwaitAtomic(gem5::ThreadContext *tc) override
Definition dyn_inst.hh:970
size_t numDestRegs() const
Returns the number of destination registers.
Definition dyn_inst.hh:681
std::queue< InstResult > instResult
The result of the instruction; assumes an instruction can have many destination registers.
Definition dyn_inst.hh:204
void setSerializeHandled()
Sets the serialization part of this instruction as handled.
Definition dyn_inst.hh:658
void setExecuted()
Sets this instruction as executed.
Definition dyn_inst.hh:761
bool isUnverifiable() const
Definition dyn_inst.hh:575
uint64_t newHtmTransactionUid() const override
Definition dyn_inst.hh:596
Fault & getFault()
TODO: This I added for the LSQRequest side to be able to modify the fault.
Definition dyn_inst.hh:504
void renameDestReg(int idx, PhysRegIdPtr renamed_dest, PhysRegIdPtr previous_rename)
Renames a destination register to a physical register.
Definition dyn_inst.hh:463
bool isFullMemBarrier() const
Definition dyn_inst.hh:570
bool isCall() const
Definition dyn_inst.hh:552
bool possibleLoadViolation() const
True if this address was found to match a previous load and they issued out of order.
Definition dyn_inst.hh:427
uint8_t resultSize()
Return the size of the instResult queue.
Definition dyn_inst.hh:696
void dump()
Dumps out contents of this BaseDynInst.
Definition dyn_inst.cc:287
bool isHtmStop() const
Definition dyn_inst.hh:584
void setInROB()
Sets this instruction as a entry the ROB.
Definition dyn_inst.hh:830
bool isSquashedInIQ() const
Returns whether or not this instruction is squashed in the IQ.
Definition dyn_inst.hh:806
void setResultReady()
Marks the result as ready.
Definition dyn_inst.hh:737
const StaticInstPtr staticInst
The StaticInst used by this BaseDynInst.
Definition dyn_inst.hh:127
bool isTranslationDelayed() const
Returns true if the DTB address translation is being delayed due to a hw page table walk.
Definition dyn_inst.hh:449
void setSerializeAfter()
Temporarily sets this instruction as a serialize after instruction.
Definition dyn_inst.hh:649
void setSquashedInROB()
Sets this instruction as squashed in the ROB.
Definition dyn_inst.hh:839
void setPinnedRegsWritten()
Sets destination registers as written.
Definition dyn_inst.hh:861
bool effAddrValid() const
Is the effective virtual address valid.
Definition dyn_inst.hh:374
bool isSerializing() const
Definition dyn_inst.hh:558
void setRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition dyn_inst.hh:1141
bool isNop() const
Definition dyn_inst.hh:539
void setSquashed()
Sets this instruction as squashed.
Definition dyn_inst.cc:323
gem5::ThreadContext * tcBase() const override
Returns the thread context.
Definition dyn_inst.hh:924
bool isSerializeAfter() const
Definition dyn_inst.hh:565
uint64_t getHtmTransactionalDepth() const override
Definition dyn_inst.hh:609
Fault getFault() const
Returns the fault type.
Definition dyn_inst.hh:501
LSQUnit::SQIterator sqIt
Definition dyn_inst.hh:355
void translationStarted(bool f)
Definition dyn_inst.hh:411
bool isTempSerializeBefore()
Checks if this serializeBefore is only temporarily set.
Definition dyn_inst.hh:646
bool isSerializeHandled()
Checks if the serialization part of this instruction has been handled.
Definition dyn_inst.hh:665
bool isInROB() const
Returns whether or not this instruction is in the ROB.
Definition dyn_inst.hh:836
bool isWriteBarrier() const
Definition dyn_inst.hh:572
bool isInIQ() const
Returns whether or not this instruction has issued.
Definition dyn_inst.hh:800
bool hitExternalSnoop() const
True if the address hit a external snoop while sitting in the LSQ.
Definition dyn_inst.hh:441
void recordResult(bool f)
Records changes to result?
Definition dyn_inst.hh:371
bool isStore() const
Definition dyn_inst.hh:542
void effAddrValid(bool b)
Definition dyn_inst.hh:375
void setPredicate(bool val) override
Definition dyn_inst.hh:896
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets a misc.
Definition dyn_inst.hh:1049
void setSquashedInIQ()
Sets this instruction as squashed in the IQ.
Definition dyn_inst.hh:803
void pcState(const PCStateBase &val) override
Set the PC state of this instruction.
Definition dyn_inst.hh:891
Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable) override
Definition dyn_inst.cc:411
bool isResultReady() const
Returns whether or not the result is ready.
Definition dyn_inst.hh:740
void armMonitor(Addr address) override
Definition dyn_inst.hh:960
CPU * cpu
Pointer to the Impl's CPU object.
Definition dyn_inst.hh:130
void trap(const Fault &fault)
Traps to handle specified fault.
Definition dyn_inst.cc:405
void hitExternalSnoop(bool f)
Definition dyn_inst.hh:442
bool isInLSQ() const
Returns whether or not this instruction is in the LSQ.
Definition dyn_inst.hh:818
Addr physEffAddr
The effective physical address.
Definition dyn_inst.hh:338
int cpuId() const
Read this CPU's ID.
Definition dyn_inst.hh:489
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
Definition dyn_inst.hh:392
void possibleLoadViolation(bool f)
Definition dyn_inst.hh:432
bool isIssued() const
Returns whether or not this instruction has issued.
Definition dyn_inst.hh:755
trace::InstRecord * traceData
InstRecord that tracks this instructions.
Definition dyn_inst.hh:141
bool isSquashedInLSQ() const
Returns whether or not this instruction is squashed in the LSQ.
Definition dyn_inst.hh:824
void setCompleted()
Sets this instruction as completed.
Definition dyn_inst.hh:731
Fault execute()
Executes the instruction.
Definition dyn_inst.cc:348
ListIt instListIt
Iterator pointing to this BaseDynInst in the list of all insts.
Definition dyn_inst.hh:320
bool isPinnedRegsSquashDone() const
Return whether dest registers' pinning status updated after squash.
Definition dyn_inst.hh:870
bool isHtmCmd() const
Definition dyn_inst.hh:586
PhysRegIdPtr renamedDestIdx(int idx) const
Definition dyn_inst.hh:262
void setCanCommit()
Sets this instruction as ready to commit.
Definition dyn_inst.hh:767
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
Definition dyn_inst.hh:945
bool isTempSerializeAfter()
Checks if this serializeAfter is only temporarily set.
Definition dyn_inst.hh:655
void clearIssued()
Clears this instruction as being issued.
Definition dyn_inst.hh:758
bool isSerializeBefore() const
Definition dyn_inst.hh:560
uint64_t getHtmTransactionUid() const override
Definition dyn_inst.hh:589
bool isControl() const
Definition dyn_inst.hh:551
bool readyToCommit() const
Returns whether or not this instruction is ready to commit.
Definition dyn_inst.hh:773
std::bitset< NumStatus > status
The status of this BaseDynInst.
Definition dyn_inst.hh:198
void setPredTaken(bool predicted_taken)
Definition dyn_inst.hh:522
const PCStateBase & readPredTarg()
Definition dyn_inst.hh:516
void setPinnedRegsRenamed()
Sets the destination registers as renamed.
Definition dyn_inst.hh:849
void setInstListIt(ListIt _instListIt)
Sets iterator for this instruction in the list of all insts.
Definition dyn_inst.hh:940
const PCStateBase & pcState() const override
Read the PC state of this instruction.
Definition dyn_inst.hh:885
bool isInteger() const
Definition dyn_inst.hh:548
void prevDestIdx(int idx, PhysRegIdPtr phys_reg_id)
Definition dyn_inst.hh:284
bool isDelayedCommit() const
Definition dyn_inst.hh:579
LSQUnit::LQIterator lqIt
Definition dyn_inst.hh:351
bool isMacroop() const
Definition dyn_inst.hh:577
std::unique_ptr< PCStateBase > branchTarget() const
Returns the branch target address.
Definition dyn_inst.hh:672
void setPinnedRegsSquashDone()
Sets dest registers' status updated after squash.
Definition dyn_inst.hh:877
DynInst(const StaticInstPtr &staticInst, const StaticInstPtr &macroop, InstSeqNum seq_num, CPU *cpu)
bool isCommitted() const
Returns whether or not this instruction is committed.
Definition dyn_inst.hh:783
bool isSquashed() const
Returns whether or not this instruction is squashed.
Definition dyn_inst.hh:789
bool isExecuted() const
Returns whether or not this instruction has executed.
Definition dyn_inst.hh:764
bool mispredicted()
Returns whether the instruction mispredicted.
Definition dyn_inst.hh:529
Fault initiateMemMgmtCmd(Request::Flags flags) override
Initiate a memory management command with no valid address.
Definition dyn_inst.cc:422
bool isPinnedRegsWritten() const
Returns whether destination registers are written.
Definition dyn_inst.hh:857
void clearCanCommit()
Clears this instruction as being ready to commit.
Definition dyn_inst.hh:770
bool memOpDone() const
Whether or not the memory operation is done.
Definition dyn_inst.hh:378
void setRequest()
Assert this instruction has generated a memory request.
Definition dyn_inst.hh:934
void setSquashedInLSQ()
Sets this instruction as squashed in the LSQ.
Definition dyn_inst.hh:821
bool isNonSpeculative() const
Definition dyn_inst.hh:573
PhysRegIdPtr prevDestIdx(int idx) const
Definition dyn_inst.hh:277
void setPredTarg(const PCStateBase &pred_pc)
Set the predicted target of this current instruction.
Definition dyn_inst.hh:514
InstSeqNum seqNum
The sequence number of the instruction.
Definition dyn_inst.hh:124
bool isHtmCancel() const
Definition dyn_inst.hh:585
void clearInROB()
Sets this instruction as a entry the ROB.
Definition dyn_inst.hh:833
void markSrcRegReady()
Records that one of the source registers is ready.
Definition dyn_inst.cc:305
void * getWritableRegOperand(const StaticInst *si, int idx) override
Definition dyn_inst.hh:1132
bool isSyscall() const
Definition dyn_inst.hh:576
size_t numSrcRegs() const
Returns the number of source registers.
Definition dyn_inst.hh:678
void removeInLSQ()
Sets this instruction as a entry the LSQ.
Definition dyn_inst.hh:815
void flattenedDestIdx(int idx, const RegId &reg_id)
Definition dyn_inst.hh:254
ssize_t sqIdx
Store queue index.
Definition dyn_inst.hh:354
void renameSrcReg(int idx, PhysRegIdPtr renamed_src)
Renames a source logical register to the physical register which has/will produce that logical regist...
Definition dyn_inst.hh:477
const StaticInstPtr macroop
The Macroop if one exists.
Definition dyn_inst.hh:327
bool translationStarted() const
True if the DTB address translation has started.
Definition dyn_inst.hh:410
bool isReturn() const
Definition dyn_inst.hh:553
void setMiscReg(int misc_reg, RegVal val) override
Sets a misc.
Definition dyn_inst.hh:1017
bool isFloating() const
Definition dyn_inst.hh:549
void setInLSQ()
Sets this instruction as a entry the LSQ.
Definition dyn_inst.hh:812
bool readPredTaken()
Returns whether the instruction was predicted taken or not.
Definition dyn_inst.hh:519
const RegId & srcRegIdx(int i) const
Returns the logical register index of the i'th source register.
Definition dyn_inst.hh:693
PhysRegIdPtr * _destIdx
Definition dyn_inst.hh:227
bool mwait(PacketPtr pkt) override
Definition dyn_inst.hh:965
void renamedDestIdx(int idx, PhysRegIdPtr phys_reg_id)
Definition dyn_inst.hh:269
size_t numSrcs() const
Definition dyn_inst.hh:240
void readySrcIdx(int idx, bool ready)
Definition dyn_inst.hh:310
void setMemAccPredicate(bool val) override
Definition dyn_inst.hh:912
Fault initiateAcc()
Initiates the access.
Definition dyn_inst.cc:365
bool readMemAccPredicate() const override
Definition dyn_inst.hh:906
bool isAtomic() const
Definition dyn_inst.hh:543
void clearSerializeBefore()
Clears the serializeBefore part of this instruction.
Definition dyn_inst.hh:643
void setInIQ()
Sets this instruction as a entry the IQ.
Definition dyn_inst.hh:794
AddressMonitor * getAddrMonitor() override
Definition dyn_inst.hh:975
bool isVector() const
Definition dyn_inst.hh:550
bool inHtmTransactionalState() const override
Definition dyn_inst.hh:603
bool translationCompleted() const
True if the DTB address translation has completed.
Definition dyn_inst.hh:415
void setCanIssue()
Sets this instruction as ready to issue.
Definition dyn_inst.hh:743
size_t numDests() const
Definition dyn_inst.hh:241
void setHtmTransactionalState(uint64_t htm_uid, uint64_t htm_depth)
Definition dyn_inst.hh:618
void setCommitted()
Sets this instruction as committed.
Definition dyn_inst.hh:780
PhysRegIdPtr * _srcIdx
Definition dyn_inst.hh:234
bool isQuiesce() const
Definition dyn_inst.hh:574
bool notAnInst() const
Definition dyn_inst.hh:381
const RegId & destRegIdx(int i) const
Returns the logical register index of the i'th destination register.
Definition dyn_inst.hh:690
std::vector< RegVal > _destMiscRegVal
Values to be written to the destination misc.
Definition dyn_inst.hh:210
OpClass opClass() const
Returns the opclass of this instruction.
Definition dyn_inst.hh:668
Addr effAddr
The effective virtual address (lds & stores only).
Definition dyn_inst.hh:335
InstResult popResult(InstResult dflt=InstResult())
Pops a result off the instResult queue.
Definition dyn_inst.hh:702
uint32_t socketId() const
Read this CPU's Socket ID.
Definition dyn_inst.hh:492
Memory operation metadata.
Definition lsq.hh:190
Class that has various thread state, such as the status, the current instruction being processed,...
gem5::ThreadContext * getTC()
Returns a pointer to the TC of this thread.
void setPredicate(bool val)
STL list class.
Definition stl.hh:51
STL vector class.
Definition stl.hh:37
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition amo.hh:269
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition bitfield.hh:79
constexpr void replaceBits(T &val, unsigned first, unsigned last, B bit_val)
A convenience function to replace bits first to last of val with bit_val in place.
Definition bitfield.hh:216
#define panic(...)
This implements a cprintf based panic() function.
Definition logging.hh:188
atomic_var_t state
Definition helpers.cc:211
uint8_t flags
Definition helpers.cc:87
Bitfield< 5 > t
Definition misc_types.hh:71
Bitfield< 7 > b
Bitfield< 7 > i
Definition misc_types.hh:67
Bitfield< 6 > si
Bitfield< 6 > f
Definition misc_types.hh:68
Bitfield< 12, 11 > set
Bitfield< 28 > so
Definition misc.hh:59
Bitfield< 5, 3 > reg
Definition types.hh:92
Bitfield< 63 > val
Definition misc.hh:804
Bitfield< 3 > addr
Definition types.hh:84
ProbePointArg< PacketInfo > Packet
Packet probe point.
Definition mem.hh:108
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
uint16_t RegIndex
Definition types.hh:176
std::shared_ptr< FaultBase > Fault
Definition types.hh:249
int16_t ThreadID
Thread index/ID type.
Definition types.hh:235
std::shared_ptr< Request > RequestPtr
Definition request.hh:94
uint64_t RegVal
Definition types.hh:173
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
uint64_t Tick
Tick count type.
Definition types.hh:58
uint16_t RequestorID
Definition request.hh:95
int ContextID
Globally unique thread context ID.
Definition types.hh:239
constexpr decltype(nullptr) NoFault
Definition types.hh:253
uint64_t InstSeqNum
Definition inst_seq.hh:40
RegClassType
Enumerate the classes of registers.
Definition reg_class.hh:60
@ InvalidRegClass
Definition reg_class.hh:71
@ MiscRegClass
Control (misc) register.
Definition reg_class.hh:70
Classes for managing reference counted objects.
Iterator to the circular queue.
unsigned storeCondFailures
ContextID contextId() const
PhysRegIdPtr * prevDestIdx
Definition dyn_inst.hh:92
PhysRegIdPtr * srcIdx
Definition dyn_inst.hh:93
PhysRegIdPtr * destIdx
Definition dyn_inst.hh:91

Generated on Tue Jun 18 2024 16:24:01 for gem5 by doxygen 1.11.0