gem5 [DEVELOP-FOR-25.1]
Loading...
Searching...
No Matches
dyn_inst.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010, 2016, 2021, 2025 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
194
195 private:
196 /* An amalgamation of a lot of boolean values into one */
197 std::bitset<MaxFlags> instFlags;
198
200 std::bitset<NumStatus> status;
201
202 protected:
206 std::queue<InstResult> instResult;
207
209 std::unique_ptr<PCStateBase> pc;
210
213
219
220 size_t _numSrcs;
221 size_t _numDests;
222
223 // Flattened register index of the destination registers of this
224 // instruction.
226
227 // Physical register index of the destination registers of this
228 // instruction.
230
231 // Physical register index of the previous producers of the
232 // architected destinations.
234
235 // Physical register index of the source registers of this instruction.
237
238 // Whether or not the source register is ready, one bit per register.
239 uint8_t *_readySrcIdx;
240
241 public:
242 size_t numSrcs() const { return _numSrcs; }
243 size_t numDests() const { return _numDests; }
244
245 // Returns the flattened register index of the idx'th destination
246 // register.
247 const RegId &
248 flattenedDestIdx(int idx) const
249 {
250 return _flatDestIdx[idx];
251 }
252
253 // Flattens a destination architectural register index into a logical
254 // index.
255 void
256 flattenedDestIdx(int idx, const RegId &reg_id)
257 {
258 _flatDestIdx[idx] = reg_id;
259 }
260
261 // Returns the physical register index of the idx'th destination
262 // register.
264 renamedDestIdx(int idx) const
265 {
266 return _destIdx[idx];
267 }
268
269 // Set the renamed dest register id.
270 void
271 renamedDestIdx(int idx, PhysRegIdPtr phys_reg_id)
272 {
273 _destIdx[idx] = phys_reg_id;
274 }
275
276 // Returns the physical register index of the previous physical
277 // register that remapped to the same logical register index.
279 prevDestIdx(int idx) const
280 {
281 return _prevDestIdx[idx];
282 }
283
284 // Set the previous renamed dest register id.
285 void
286 prevDestIdx(int idx, PhysRegIdPtr phys_reg_id)
287 {
288 _prevDestIdx[idx] = phys_reg_id;
289 }
290
291 // Returns the physical register index of the i'th source register.
293 renamedSrcIdx(int idx) const
294 {
295 return _srcIdx[idx];
296 }
297
298 void
299 renamedSrcIdx(int idx, PhysRegIdPtr phys_reg_id)
300 {
301 _srcIdx[idx] = phys_reg_id;
302 }
303
304 bool
305 readySrcIdx(int idx) const
306 {
307 uint8_t &byte = _readySrcIdx[idx / 8];
308 return bits(byte, idx % 8);
309 }
310
311 void
312 readySrcIdx(int idx, bool ready)
313 {
314 uint8_t &byte = _readySrcIdx[idx / 8];
315 replaceBits(byte, idx % 8, ready ? 1 : 0);
316 }
317
320
323
325
326 std::unique_ptr<PCStateBase> predPC;
327
330
332 uint8_t readyRegs = 0;
333
334 public:
336
338
341
343 unsigned memReqFlags = 0;
344
346 unsigned effSize;
347
349 uint8_t *memData = nullptr;
350
352 ssize_t lqIdx = -1;
354
356 ssize_t sqIdx = -1;
358
359
361
366
368 // Need a copy of main request pointer to verify on writes.
370
371 public:
374
376 bool effAddrValid() const { return instFlags[EffAddrValid]; }
378
380 bool memOpDone() const { return instFlags[MemOpDone]; }
381 void memOpDone(bool f) { instFlags[MemOpDone] = f; }
382
383 bool notAnInst() const { return instFlags[NotAnInst]; }
384 void setNotAnInst() { instFlags[NotAnInst] = true; }
385
386
388 //
389 // INSTRUCTION EXECUTION
390 //
392
393 void
394 demapPage(Addr vaddr, uint64_t asn) override
395 {
396 cpu->demapPage(vaddr, asn);
397 }
398
399 Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags,
400 const std::vector<bool> &byte_enable) override;
401
403
404 Fault writeMem(uint8_t *data, unsigned size, Addr addr,
405 Request::Flags flags, uint64_t *res,
406 const std::vector<bool> &byte_enable) override;
407
408 Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags,
409 AtomicOpFunctorPtr amo_op) override;
410
414
416 bool
418 {
420 }
422
428 bool
430 {
432 }
433 void
438
445
450 bool
452 {
454 }
455
456 public:
457#ifdef GEM5_DEBUG
458 void dumpSNList();
459#endif
460
464 void
465 renameDestReg(int idx, PhysRegIdPtr renamed_dest,
466 PhysRegIdPtr previous_rename)
467 {
468 renamedDestIdx(idx, renamed_dest);
469 prevDestIdx(idx, previous_rename);
470 if (renamed_dest->isPinned())
472 }
473
478 void
479 renameSrcReg(int idx, PhysRegIdPtr renamed_src)
480 {
481 renamedSrcIdx(idx, renamed_src);
482 }
483
485 void dump();
486
488 void dump(std::string &outstring);
489
491 int cpuId() const { return cpu->cpuId(); }
492
494 uint32_t socketId() const { return cpu->socketId(); }
495
497 RequestorID requestorId() const { return cpu->dataRequestorId(); }
498
500 ContextID contextId() const { return thread->contextId(); }
501
503 Fault getFault() const { return fault; }
506 Fault& getFault() { return fault; }
507
513 bool doneTargCalc() { return false; }
514
516 void setPredTarg(const PCStateBase &pred_pc) { set(predPC, pred_pc); }
517
518 const PCStateBase &readPredTarg() { return *predPC; }
519
521 bool
523 {
524 return instFlags[PredTaken];
525 }
526
527 void
528 setPredTaken(bool predicted_taken)
529 {
530 instFlags[PredTaken] = predicted_taken;
531 }
532
534 bool
536 {
537 std::unique_ptr<PCStateBase> next_pc(pc->clone());
538 staticInst->advancePC(*next_pc);
539 return *next_pc != *predPC;
540 }
541
542 //
543 // Instruction types. Forward checks to StaticInst object.
544 //
545 bool isNop() const { return staticInst->isNop(); }
546 bool isMemRef() const { return staticInst->isMemRef(); }
547 bool isLoad() const { return staticInst->isLoad(); }
548 bool isStore() const { return staticInst->isStore(); }
549 bool isAtomic() const { return staticInst->isAtomic(); }
551 { return staticInst->isStoreConditional(); }
552 bool isInstPrefetch() const { return staticInst->isInstPrefetch(); }
553 bool isDataPrefetch() const { return staticInst->isDataPrefetch(); }
554 bool isInteger() const { return staticInst->isInteger(); }
555 bool isFloating() const { return staticInst->isFloating(); }
556 bool isVector() const { return staticInst->isVector(); }
557 bool isControl() const { return staticInst->isControl(); }
558 bool isCall() const { return staticInst->isCall(); }
559 bool isReturn() const { return staticInst->isReturn(); }
560 bool isDirectCtrl() const { return staticInst->isDirectCtrl(); }
561 bool isIndirectCtrl() const { return staticInst->isIndirectCtrl(); }
562 bool isCondCtrl() const { return staticInst->isCondCtrl(); }
563 bool isUncondCtrl() const { return staticInst->isUncondCtrl(); }
564 bool isSerializing() const { return staticInst->isSerializing(); }
565 bool
567 {
568 return staticInst->isSerializeBefore() || status[SerializeBefore];
569 }
570 bool
572 {
573 return staticInst->isSerializeAfter() || status[SerializeAfter];
574 }
575 bool isSquashAfter() const { return staticInst->isSquashAfter(); }
576 bool isFullMemBarrier() const { return staticInst->isFullMemBarrier(); }
577 bool isReadBarrier() const { return staticInst->isReadBarrier(); }
578 bool isWriteBarrier() const { return staticInst->isWriteBarrier(); }
579 bool isNonSpeculative() const { return staticInst->isNonSpeculative(); }
580 bool isQuiesce() const { return staticInst->isQuiesce(); }
581 bool isUnverifiable() const { return staticInst->isUnverifiable(); }
582 bool isSyscall() const { return staticInst->isSyscall(); }
583 bool isMacroop() const { return staticInst->isMacroop(); }
584 bool isMicroop() const { return staticInst->isMicroop(); }
585 bool isDelayedCommit() const { return staticInst->isDelayedCommit(); }
586 bool isLastMicroop() const { return staticInst->isLastMicroop(); }
587 bool isFirstMicroop() const { return staticInst->isFirstMicroop(); }
588 // hardware transactional memory
589 bool isHtmStart() const { return staticInst->isHtmStart(); }
590 bool isHtmStop() const { return staticInst->isHtmStop(); }
591 bool isHtmCancel() const { return staticInst->isHtmCancel(); }
592 bool isHtmCmd() const { return staticInst->isHtmCmd(); }
593
594 uint64_t
595 getHtmTransactionUid() const override
596 {
598 return htmUid;
599 }
600
601 uint64_t
602 newHtmTransactionUid() const override
603 {
604 panic("Not yet implemented\n");
605 return 0;
606 }
607
608 bool
609 inHtmTransactionalState() const override
610 {
612 }
613
614 uint64_t
616 {
618 return htmDepth;
619 else
620 return 0;
621 }
622
623 void
624 setHtmTransactionalState(uint64_t htm_uid, uint64_t htm_depth)
625 {
627 htmUid = htm_uid;
628 htmDepth = htm_depth;
629 }
630
631 void
633 {
635 DPRINTF(HtmCpu,
636 "clearing instuction's transactional state htmUid=%u\n",
638
640 htmUid = -1;
641 htmDepth = 0;
642 }
643 }
644
647
650
653
656
659
662
665
672
674 OpClass opClass() const { return staticInst->opClass(); }
675
677 std::unique_ptr<PCStateBase>
679 {
680 return staticInst->branchTarget(*pc);
681 }
682
684 size_t numSrcRegs() const { return numSrcs(); }
685
687 size_t numDestRegs() const { return numDests(); }
688
689 size_t
691 {
692 return staticInst->numDestRegs(type);
693 }
694
696 const RegId& destRegIdx(int i) const { return staticInst->destRegIdx(i); }
697
699 const RegId& srcRegIdx(int i) const { return staticInst->srcRegIdx(i); }
700
702 uint8_t resultSize() { return instResult.size(); }
703
709 {
710 if (!instResult.empty()) {
711 InstResult t = instResult.front();
712 instResult.pop();
713 return t;
714 }
715 return dflt;
716 }
717
720 template<typename T>
721 void
722 setResult(const RegClass &reg_class, T &&t)
723 {
724 if (instFlags[RecordResult]) {
725 instResult.emplace(reg_class, std::forward<T>(t));
726 }
727 }
728
729
731 void markSrcRegReady();
732
734 void markSrcRegReady(RegIndex src_idx);
735
738
740 bool isCompleted() const { return status[Completed]; }
741
744
746 bool isResultReady() const { return status[ResultReady]; }
747
749 void setCanIssue() { status.set(CanIssue); }
750
752 bool readyToIssue() const { return status[CanIssue]; }
753
755 void clearCanIssue() { status.reset(CanIssue); }
756
758 void setIssued() { status.set(Issued); }
759
761 bool isIssued() const { return status[Issued]; }
762
764 void clearIssued() { status.reset(Issued); }
765
767 void setExecuted() { status.set(Executed); }
768
770 bool isExecuted() const { return status[Executed]; }
771
774
776 void clearCanCommit() { status.reset(CanCommit); }
777
779 bool readyToCommit() const { return status[CanCommit]; }
780
781 void setAtCommit() { status.set(AtCommit); }
782
783 bool isAtCommit() { return status[AtCommit]; }
784
787
789 bool isCommitted() const { return status[Committed]; }
790
792 void setSquashed();
793
795 bool isSquashed() const { return status[Squashed]; }
796
797 //Instruction Queue Entry
798 //-----------------------
800 void setInIQ() { status.set(IqEntry); }
801
803 void clearInIQ() { status.reset(IqEntry); }
804
806 bool isInIQ() const { return status[IqEntry]; }
807
810
812 bool isSquashedInIQ() const { return status[SquashedInIQ]; }
813
814
815 //Load / Store Queue Functions
816 //-----------------------
818 void setInLSQ() { status.set(LsqEntry); }
819
821 void removeInLSQ() { status.reset(LsqEntry); }
822
824 bool isInLSQ() const { return status[LsqEntry]; }
825
828
830 bool isSquashedInLSQ() const { return status[SquashedInLSQ]; }
831
832
833 //Reorder Buffer Functions
834 //-----------------------
836 void setInROB() { status.set(RobEntry); }
837
839 void clearInROB() { status.reset(RobEntry); }
840
842 bool isInROB() const { return status[RobEntry]; }
843
846
848 bool isSquashedInROB() const { return status[SquashedInROB]; }
849
854
858 bool noCapableFU() const { return instFlags[NoCapableFU]; }
859
862
864 void
871
874
876 void
883
885 bool
887 {
889 }
890
892 void
898
900 const PCStateBase &
901 pcState() const override
902 {
903 return *pc;
904 }
905
907 void pcState(const PCStateBase &val) override { set(pc, val); }
908
909 bool readPredicate() const override { return instFlags[Predicate]; }
910
911 void
912 setPredicate(bool val) override
913 {
915
916 if (traceData) {
917 traceData->setPredicate(val);
918 }
919 }
920
921 bool
922 readMemAccPredicate() const override
923 {
925 }
926
927 void
928 setMemAccPredicate(bool val) override
929 {
931 }
932
934 void setTid(ThreadID tid) { threadNumber = tid; }
935
937 void setThreadState(ThreadState *state) { thread = state; }
938
940 gem5::ThreadContext *tcBase() const override { return thread->getTC(); }
941
942 public:
946
948 bool hasRequest() const { return instFlags[ReqMade]; }
950 void setRequest() { instFlags[ReqMade] = true; }
951
954
956 void setInstListIt(ListIt _instListIt) { instListIt = _instListIt; }
957
958 public:
960 unsigned int
961 readStCondFailures() const override
962 {
963 return thread->storeCondFailures;
964 }
965
967 void
968 setStCondFailures(unsigned int sc_failures) override
969 {
970 thread->storeCondFailures = sc_failures;
971 }
972
973 public:
974 // monitor/mwait funtions
975 void
976 armMonitor(Addr address) override
977 {
978 cpu->armMonitor(threadNumber, address);
979 }
980 bool
981 mwait(PacketPtr pkt) override
982 {
983 return cpu->mwait(threadNumber, pkt);
984 }
985 void
987 {
988 return cpu->mwaitAtomic(threadNumber, tc, cpu->mmu);
989 }
991 getAddrMonitor() override
992 {
993 return cpu->getCpuAddrMonitor(threadNumber);
994 }
995
996 private:
997 // hardware transactional memory
998 uint64_t htmUid = -1;
999 uint64_t htmDepth = 0;
1000
1001 public:
1002 // Value -1 indicates that particular phase
1003 // hasn't happened (yet).
1005 Tick fetchTick = -1; // instruction fetch is completed.
1006 int32_t decodeTick = -1; // instruction enters decode phase
1007 int32_t renameTick = -1; // instruction enters rename phase
1008 int32_t renameEndTick = -1; // instruction exits rename phase
1009 int32_t dispatchTick = -1;
1010 int32_t issueTick = -1;
1011 int32_t completeTick = -1;
1012 int32_t commitTick = -1;
1013 int32_t storeTick = -1;
1014
1015 /* Values used by LoadToUse stat */
1018
1022 RegVal
1023 readMiscReg(int misc_reg) override
1024 {
1025 return cpu->readMiscReg(misc_reg, threadNumber);
1026 }
1027
1031 void
1033 {
1040 for (auto &idx: _destMiscRegIdx) {
1041 if (idx == misc_reg)
1042 return;
1043 }
1044
1045 _destMiscRegIdx.push_back(misc_reg);
1046 _destMiscRegVal.push_back(val);
1047 }
1048
1052 RegVal
1053 readMiscRegOperand(const StaticInst *si, int idx) override
1054 {
1055 const RegId& reg = si->srcRegIdx(idx);
1056 assert(reg.is(MiscRegClass));
1057 return cpu->readMiscReg(reg.index(), threadNumber);
1058 }
1059
1063 void
1064 setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
1065 {
1066 const RegId& reg = si->destRegIdx(idx);
1067 assert(reg.is(MiscRegClass));
1068 setMiscReg(reg.index(), val);
1069 }
1070
1072 void
1074 {
1075 // @todo: Pretty convoluted way to avoid squashing from happening when
1076 // using the TC during an instruction's execution (specifically for
1077 // instructions that have side-effects that use the TC). Fix this.
1078 // See cpu/o3/dyn_inst_impl.hh.
1079 bool no_squash_from_TC = thread->noSquashFromTC;
1080 thread->noSquashFromTC = true;
1081
1082 for (int i = 0; i < _destMiscRegIdx.size(); i++)
1083 cpu->setMiscReg(
1085
1086 thread->noSquashFromTC = no_squash_from_TC;
1087 }
1088
1089 void
1091 {
1092
1093 for (int idx = 0; idx < numDestRegs(); idx++) {
1094 PhysRegIdPtr prev_phys_reg = prevDestIdx(idx);
1095 const RegId& original_dest_reg = staticInst->destRegIdx(idx);
1096 const auto bytes = original_dest_reg.regClass().regBytes();
1097
1098 // Registers which aren't renamed don't need to be forwarded.
1099 if (!original_dest_reg.isRenameable())
1100 continue;
1101
1102 if (bytes == sizeof(RegVal)) {
1103 setRegOperand(staticInst.get(), idx,
1104 cpu->getReg(prev_phys_reg, threadNumber));
1105 } else {
1106 const size_t size = original_dest_reg.regClass().regBytes();
1107 auto val = std::make_unique<uint8_t[]>(size);
1108 cpu->getReg(prev_phys_reg, val.get(), threadNumber);
1109 setRegOperand(staticInst.get(), idx, val.get());
1110 }
1111 }
1112 }
1113
1114 void trap(const Fault &fault);
1115
1116 public:
1117
1118 // The register accessor methods provide the index of the
1119 // instruction's operand (e.g., 0 or 1), not the architectural
1120 // register index, to simplify the implementation of register
1121 // renaming. We find the architectural register index by indexing
1122 // into the instruction's own operand index table. Note that a
1123 // raw pointer to the StaticInst is provided instead of a
1124 // ref-counted StaticInstPtr to redice overhead. This is fine as
1125 // long as these methods don't copy the pointer into any long-term
1126 // storage (which is pretty hard to imagine they would have reason
1127 // to do).
1128
1129 RegVal
1130 getRegOperand(const StaticInst *si, int idx) override
1131 {
1132 const PhysRegIdPtr reg = renamedSrcIdx(idx);
1133 if (reg->is(InvalidRegClass))
1134 return 0;
1135 return cpu->getReg(reg, threadNumber);
1136 }
1137
1138 void
1139 getRegOperand(const StaticInst *si, int idx, void *val) override
1140 {
1141 const PhysRegIdPtr reg = renamedSrcIdx(idx);
1142 if (reg->is(InvalidRegClass))
1143 return;
1144 cpu->getReg(reg, val, threadNumber);
1145 }
1146
1147 void *
1148 getWritableRegOperand(const StaticInst *si, int idx) override
1149 {
1150 return cpu->getWritableReg(renamedDestIdx(idx), threadNumber);
1151 }
1152
1156 void
1157 setRegOperand(const StaticInst *si, int idx, RegVal val) override
1158 {
1159 const PhysRegIdPtr reg = renamedDestIdx(idx);
1160 if (reg->is(InvalidRegClass))
1161 return;
1162 cpu->setReg(reg, val, threadNumber);
1163 setResult(reg->regClass(), val);
1164 }
1165
1166 void
1167 setRegOperand(const StaticInst *si, int idx, const void *val) override
1168 {
1169 const PhysRegIdPtr reg = renamedDestIdx(idx);
1170 if (reg->is(InvalidRegClass))
1171 return;
1172 cpu->setReg(reg, val, threadNumber);
1173 setResult(reg->regClass(), val);
1174 }
1175};
1176
1177} // namespace o3
1178} // namespace gem5
1179
1180#endif // __CPU_O3_DYN_INST_HH__
#define DPRINTF(x,...)
Definition trace.hh:209
const char data[]
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
bool isPinned() const
Definition reg_class.hh:493
RefCounted(const RefCounted &)
constexpr size_t regBytes() const
Definition reg_class.hh:240
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
gem5::Flags< FlagsType > Flags
Definition request.hh:102
Base, ISA-independent static instruction class.
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:97
bool hasRequest() const
Has this instruction generated a memory request.
Definition dyn_inst.hh:948
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:740
const RegId & flattenedDestIdx(int idx) const
Definition dyn_inst.hh:248
Tick fetchTick
Tick records used for the pipeline activity viewer.
Definition dyn_inst.hh:1005
uint8_t readyRegs
How many source registers are ready.
Definition dyn_inst.hh:332
uint8_t * memData
Pointer to the data for the memory access.
Definition dyn_inst.hh:349
RequestorID requestorId() const
Read this CPU's data requestor ID.
Definition dyn_inst.hh:497
bool isStoreConditional() const
Definition dyn_inst.hh:550
unsigned memReqFlags
The memory request flags (from translation).
Definition dyn_inst.hh:343
bool isDirectCtrl() const
Definition dyn_inst.hh:560
bool isMicroop() const
Definition dyn_inst.hh:584
size_t numDestRegs(RegClassType type) const
Definition dyn_inst.hh:690
RequestPtr reqToVerify
Definition dyn_inst.hh:369
bool isHtmStart() const
Definition dyn_inst.hh:589
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
Reads a misc.
Definition dyn_inst.hh:1053
bool isCondCtrl() const
Definition dyn_inst.hh:562
@ MaxFlags
Processor does not have capability to execute the instruction.
Definition dyn_inst.hh:192
void memOpDone(bool f)
Definition dyn_inst.hh:381
bool isSquashAfter() const
Definition dyn_inst.hh:575
bool doneTargCalc()
Checks whether or not this instruction has had its branch target calculated yet.
Definition dyn_inst.hh:513
void setIssued()
Sets this instruction as issued from the IQ.
Definition dyn_inst.hh:758
ThreadState * thread
Pointer to the thread state.
Definition dyn_inst.hh:135
bool isIndirectCtrl() const
Definition dyn_inst.hh:561
void clearCanIssue()
Clears this instruction being able to issue.
Definition dyn_inst.hh:755
void clearSerializeAfter()
Clears the serializeAfter part of this instruction.
Definition dyn_inst.hh:658
PhysRegIdPtr * _prevDestIdx
Definition dyn_inst.hh:233
std::unique_ptr< PCStateBase > predPC
Predicted PC state after this instruction.
Definition dyn_inst.hh:326
bool isUncondCtrl() const
Definition dyn_inst.hh:563
unsigned effSize
The size of the request.
Definition dyn_inst.hh:346
RegId * _flatDestIdx
Definition dyn_inst.hh:225
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:239
void clearInIQ()
Sets this instruction as a entry the IQ.
Definition dyn_inst.hh:803
void setSerializeBefore()
Temporarily sets this instruction as a serialize before instruction.
Definition dyn_inst.hh:646
void clearHtmTransactionalState()
Definition dyn_inst.hh:632
void setTid(ThreadID tid)
Sets the thread id.
Definition dyn_inst.hh:934
bool readyToIssue() const
Returns whether or not this instruction is ready to issue.
Definition dyn_inst.hh:752
void translationCompleted(bool f)
Definition dyn_inst.hh:421
bool isLoad() const
Definition dyn_inst.hh:547
uint64_t htmDepth
Definition dyn_inst.hh:999
@ 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:299
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:218
void setResult(const RegClass &reg_class, T &&t)
Pushes a result onto the instResult queue.
Definition dyn_inst.hh:722
bool isMemRef() const
Definition dyn_inst.hh:546
ssize_t lqIdx
Load queue index.
Definition dyn_inst.hh:352
bool strictlyOrdered() const
Is this instruction's memory access strictly ordered?
Definition dyn_inst.hh:944
bool readPredicate() const override
Definition dyn_inst.hh:909
void getRegOperand(const StaticInst *si, int idx, void *val) override
Definition dyn_inst.hh:1139
bool isFirstMicroop() const
Definition dyn_inst.hh:587
bool isInstPrefetch() const
Definition dyn_inst.hh:552
std::unique_ptr< PCStateBase > pc
PC state for this instruction.
Definition dyn_inst.hh:209
ThreadID threadNumber
The thread this instruction is from.
Definition dyn_inst.hh:319
std::bitset< MaxFlags > instFlags
Definition dyn_inst.hh:197
void setThreadState(ThreadState *state)
Sets the pointer to the thread state.
Definition dyn_inst.hh:937
bool readySrcIdx(int idx) const
Definition dyn_inst.hh:305
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:365
void setRegOperand(const StaticInst *si, int idx, const void *val) override
Definition dyn_inst.hh:1167
bool isDataPrefetch() const
Definition dyn_inst.hh:553
bool isSquashedInROB() const
Returns whether or not this instruction is squashed in the ROB.
Definition dyn_inst.hh:848
RegVal readMiscReg(int misc_reg) override
Reads a misc.
Definition dyn_inst.hh:1023
void updateMiscRegs()
Called at the commit stage to update the misc.
Definition dyn_inst.hh:1073
bool isPinnedRegsRenamed() const
Returns whether pinned registers are renamed.
Definition dyn_inst.hh:861
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
Definition dyn_inst.hh:968
bool isReadBarrier() const
Definition dyn_inst.hh:577
bool readPredTaken() const
Returns whether the instruction was predicted taken or not.
Definition dyn_inst.hh:522
void strictlyOrdered(bool so)
Definition dyn_inst.hh:945
bool isLastMicroop() const
Definition dyn_inst.hh:586
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:1130
ListIt & getInstListIt()
Returns iterator to this instruction in the list of all insts.
Definition dyn_inst.hh:953
void setNoCapableFU()
Mark this instruction as having attempted to execute but CPU did not have a capable functional unit.
Definition dyn_inst.hh:853
int32_t renameEndTick
Definition dyn_inst.hh:1008
ContextID contextId() const
Read this context's system-wide ID.
Definition dyn_inst.hh:500
PhysRegIdPtr renamedSrcIdx(int idx) const
Definition dyn_inst.hh:293
void mwaitAtomic(gem5::ThreadContext *tc) override
Definition dyn_inst.hh:986
size_t numDestRegs() const
Returns the number of destination registers.
Definition dyn_inst.hh:687
std::queue< InstResult > instResult
The result of the instruction; assumes an instruction can have many destination registers.
Definition dyn_inst.hh:206
void setSerializeHandled()
Sets the serialization part of this instruction as handled.
Definition dyn_inst.hh:664
void setExecuted()
Sets this instruction as executed.
Definition dyn_inst.hh:767
bool isUnverifiable() const
Definition dyn_inst.hh:581
uint64_t newHtmTransactionUid() const override
Definition dyn_inst.hh:602
Fault & getFault()
TODO: This I added for the LSQRequest side to be able to modify the fault.
Definition dyn_inst.hh:506
void renameDestReg(int idx, PhysRegIdPtr renamed_dest, PhysRegIdPtr previous_rename)
Renames a destination register to a physical register.
Definition dyn_inst.hh:465
bool isFullMemBarrier() const
Definition dyn_inst.hh:576
bool isCall() const
Definition dyn_inst.hh:558
bool possibleLoadViolation() const
True if this address was found to match a previous load and they issued out of order.
Definition dyn_inst.hh:429
uint8_t resultSize()
Return the size of the instResult queue.
Definition dyn_inst.hh:702
void dump()
Dumps out contents of this BaseDynInst.
Definition dyn_inst.cc:287
bool isHtmStop() const
Definition dyn_inst.hh:590
void setInROB()
Sets this instruction as a entry the ROB.
Definition dyn_inst.hh:836
bool isSquashedInIQ() const
Returns whether or not this instruction is squashed in the IQ.
Definition dyn_inst.hh:812
void setResultReady()
Marks the result as ready.
Definition dyn_inst.hh:743
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:451
void setSerializeAfter()
Temporarily sets this instruction as a serialize after instruction.
Definition dyn_inst.hh:655
void setSquashedInROB()
Sets this instruction as squashed in the ROB.
Definition dyn_inst.hh:845
void setPinnedRegsWritten()
Sets destination registers as written.
Definition dyn_inst.hh:877
bool effAddrValid() const
Is the effective virtual address valid.
Definition dyn_inst.hh:376
bool isSerializing() const
Definition dyn_inst.hh:564
void setRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition dyn_inst.hh:1157
bool isNop() const
Definition dyn_inst.hh:545
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:940
bool isSerializeAfter() const
Definition dyn_inst.hh:571
uint64_t getHtmTransactionalDepth() const override
Definition dyn_inst.hh:615
Fault getFault() const
Returns the fault type.
Definition dyn_inst.hh:503
LSQUnit::SQIterator sqIt
Definition dyn_inst.hh:357
void translationStarted(bool f)
Definition dyn_inst.hh:413
bool isTempSerializeBefore()
Checks if this serializeBefore is only temporarily set.
Definition dyn_inst.hh:652
bool isSerializeHandled()
Checks if the serialization part of this instruction has been handled.
Definition dyn_inst.hh:671
bool isInROB() const
Returns whether or not this instruction is in the ROB.
Definition dyn_inst.hh:842
bool isWriteBarrier() const
Definition dyn_inst.hh:578
bool isInIQ() const
Returns whether or not this instruction has issued.
Definition dyn_inst.hh:806
bool hitExternalSnoop() const
True if the address hit a external snoop while sitting in the LSQ.
Definition dyn_inst.hh:443
void recordResult(bool f)
Records changes to result?
Definition dyn_inst.hh:373
bool isStore() const
Definition dyn_inst.hh:548
void effAddrValid(bool b)
Definition dyn_inst.hh:377
void setPredicate(bool val) override
Definition dyn_inst.hh:912
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets a misc.
Definition dyn_inst.hh:1064
void setSquashedInIQ()
Sets this instruction as squashed in the IQ.
Definition dyn_inst.hh:809
void pcState(const PCStateBase &val) override
Set the PC state of this instruction.
Definition dyn_inst.hh:907
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:746
void armMonitor(Addr address) override
Definition dyn_inst.hh:976
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:444
bool isInLSQ() const
Returns whether or not this instruction is in the LSQ.
Definition dyn_inst.hh:824
Addr physEffAddr
The effective physical address.
Definition dyn_inst.hh:340
int cpuId() const
Read this CPU's ID.
Definition dyn_inst.hh:491
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
Definition dyn_inst.hh:394
void possibleLoadViolation(bool f)
Definition dyn_inst.hh:434
bool isIssued() const
Returns whether or not this instruction has issued.
Definition dyn_inst.hh:761
trace::InstRecord * traceData
InstRecord that tracks this instructions.
Definition dyn_inst.hh:141
bool mispredicted() const
Returns whether the instruction mispredicted.
Definition dyn_inst.hh:535
bool isSquashedInLSQ() const
Returns whether or not this instruction is squashed in the LSQ.
Definition dyn_inst.hh:830
void setCompleted()
Sets this instruction as completed.
Definition dyn_inst.hh:737
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:322
bool isPinnedRegsSquashDone() const
Return whether dest registers' pinning status updated after squash.
Definition dyn_inst.hh:886
bool isHtmCmd() const
Definition dyn_inst.hh:592
PhysRegIdPtr renamedDestIdx(int idx) const
Definition dyn_inst.hh:264
void setCanCommit()
Sets this instruction as ready to commit.
Definition dyn_inst.hh:773
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
Definition dyn_inst.hh:961
bool isTempSerializeAfter()
Checks if this serializeAfter is only temporarily set.
Definition dyn_inst.hh:661
void clearIssued()
Clears this instruction as being issued.
Definition dyn_inst.hh:764
bool isSerializeBefore() const
Definition dyn_inst.hh:566
uint64_t getHtmTransactionUid() const override
Definition dyn_inst.hh:595
bool isControl() const
Definition dyn_inst.hh:557
bool readyToCommit() const
Returns whether or not this instruction is ready to commit.
Definition dyn_inst.hh:779
std::bitset< NumStatus > status
The status of this BaseDynInst.
Definition dyn_inst.hh:200
void setPredTaken(bool predicted_taken)
Definition dyn_inst.hh:528
const PCStateBase & readPredTarg()
Definition dyn_inst.hh:518
void setPinnedRegsRenamed()
Sets the destination registers as renamed.
Definition dyn_inst.hh:865
void setInstListIt(ListIt _instListIt)
Sets iterator for this instruction in the list of all insts.
Definition dyn_inst.hh:956
const PCStateBase & pcState() const override
Read the PC state of this instruction.
Definition dyn_inst.hh:901
bool isInteger() const
Definition dyn_inst.hh:554
void prevDestIdx(int idx, PhysRegIdPtr phys_reg_id)
Definition dyn_inst.hh:286
bool isDelayedCommit() const
Definition dyn_inst.hh:585
LSQUnit::LQIterator lqIt
Definition dyn_inst.hh:353
bool isMacroop() const
Definition dyn_inst.hh:583
std::unique_ptr< PCStateBase > branchTarget() const
Returns the branch target address.
Definition dyn_inst.hh:678
void setPinnedRegsSquashDone()
Sets dest registers' status updated after squash.
Definition dyn_inst.hh:893
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:789
bool isSquashed() const
Returns whether or not this instruction is squashed.
Definition dyn_inst.hh:795
bool isExecuted() const
Returns whether or not this instruction has executed.
Definition dyn_inst.hh:770
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:873
void clearCanCommit()
Clears this instruction as being ready to commit.
Definition dyn_inst.hh:776
bool memOpDone() const
Whether or not the memory operation is done.
Definition dyn_inst.hh:380
void setRequest()
Assert this instruction has generated a memory request.
Definition dyn_inst.hh:950
void setSquashedInLSQ()
Sets this instruction as squashed in the LSQ.
Definition dyn_inst.hh:827
bool isNonSpeculative() const
Definition dyn_inst.hh:579
PhysRegIdPtr prevDestIdx(int idx) const
Definition dyn_inst.hh:279
void setPredTarg(const PCStateBase &pred_pc)
Set the predicted target of this current instruction.
Definition dyn_inst.hh:516
InstSeqNum seqNum
The sequence number of the instruction.
Definition dyn_inst.hh:124
bool isHtmCancel() const
Definition dyn_inst.hh:591
bool noCapableFU() const
Returns whether or not this instruction attempted to execute and found not capable FU.
Definition dyn_inst.hh:858
void clearInROB()
Sets this instruction as a entry the ROB.
Definition dyn_inst.hh:839
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:1148
bool isSyscall() const
Definition dyn_inst.hh:582
size_t numSrcRegs() const
Returns the number of source registers.
Definition dyn_inst.hh:684
void removeInLSQ()
Sets this instruction as a entry the LSQ.
Definition dyn_inst.hh:821
void flattenedDestIdx(int idx, const RegId &reg_id)
Definition dyn_inst.hh:256
ssize_t sqIdx
Store queue index.
Definition dyn_inst.hh:356
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:479
const StaticInstPtr macroop
The Macroop if one exists.
Definition dyn_inst.hh:329
bool translationStarted() const
True if the DTB address translation has started.
Definition dyn_inst.hh:412
bool isReturn() const
Definition dyn_inst.hh:559
void setMiscReg(int misc_reg, RegVal val) override
Sets a misc.
Definition dyn_inst.hh:1032
bool isFloating() const
Definition dyn_inst.hh:555
void setInLSQ()
Sets this instruction as a entry the LSQ.
Definition dyn_inst.hh:818
const RegId & srcRegIdx(int i) const
Returns the logical register index of the i'th source register.
Definition dyn_inst.hh:699
PhysRegIdPtr * _destIdx
Definition dyn_inst.hh:229
bool mwait(PacketPtr pkt) override
Definition dyn_inst.hh:981
void renamedDestIdx(int idx, PhysRegIdPtr phys_reg_id)
Definition dyn_inst.hh:271
size_t numSrcs() const
Definition dyn_inst.hh:242
void readySrcIdx(int idx, bool ready)
Definition dyn_inst.hh:312
void setMemAccPredicate(bool val) override
Definition dyn_inst.hh:928
Fault initiateAcc()
Initiates the access.
Definition dyn_inst.cc:365
bool readMemAccPredicate() const override
Definition dyn_inst.hh:922
bool isAtomic() const
Definition dyn_inst.hh:549
void clearSerializeBefore()
Clears the serializeBefore part of this instruction.
Definition dyn_inst.hh:649
void setInIQ()
Sets this instruction as a entry the IQ.
Definition dyn_inst.hh:800
AddressMonitor * getAddrMonitor() override
Definition dyn_inst.hh:991
bool isVector() const
Definition dyn_inst.hh:556
bool inHtmTransactionalState() const override
Definition dyn_inst.hh:609
bool translationCompleted() const
True if the DTB address translation has completed.
Definition dyn_inst.hh:417
void setCanIssue()
Sets this instruction as ready to issue.
Definition dyn_inst.hh:749
size_t numDests() const
Definition dyn_inst.hh:243
void setHtmTransactionalState(uint64_t htm_uid, uint64_t htm_depth)
Definition dyn_inst.hh:624
void setCommitted()
Sets this instruction as committed.
Definition dyn_inst.hh:786
PhysRegIdPtr * _srcIdx
Definition dyn_inst.hh:236
bool isQuiesce() const
Definition dyn_inst.hh:580
bool notAnInst() const
Definition dyn_inst.hh:383
const RegId & destRegIdx(int i) const
Returns the logical register index of the i'th destination register.
Definition dyn_inst.hh:696
std::vector< RegVal > _destMiscRegVal
Values to be written to the destination misc.
Definition dyn_inst.hh:212
OpClass opClass() const
Returns the opclass of this instruction.
Definition dyn_inst.hh:674
Addr effAddr
The effective virtual address (lds & stores only).
Definition dyn_inst.hh:337
InstResult popResult(InstResult dflt=InstResult())
Pops a result off the instResult queue.
Definition dyn_inst.hh:708
uint32_t socketId() const
Read this CPU's Socket ID.
Definition dyn_inst.hh:494
CircularQueue< LQEntry >::iterator LQIterator
Definition lsq_unit.hh:567
CircularQueue< SQEntry >::iterator SQIterator
Definition lsq_unit.hh:568
Memory operation metadata.
Definition lsq.hh:220
Class that has various thread state, such as the status, the current instruction being processed,...
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:220
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
Copyright (c) 2024 Arm Limited 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
PhysRegId * PhysRegIdPtr
Definition reg_class.hh:511
uint64_t Tick
Tick count type.
Definition types.hh:58
uint16_t RequestorID
Definition request.hh:95
Packet * PacketPtr
RefCountingPtr< StaticInst > StaticInstPtr
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.
PhysRegIdPtr * prevDestIdx
Definition dyn_inst.hh:92
PhysRegIdPtr * srcIdx
Definition dyn_inst.hh:93
PhysRegIdPtr * destIdx
Definition dyn_inst.hh:91

Generated on Mon Oct 27 2025 04:13:00 for gem5 by doxygen 1.14.0