gem5 v24.1.0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
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
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
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
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
522
523 void
524 setPredTaken(bool predicted_taken)
525 {
526 instFlags[PredTaken] = predicted_taken;
527 }
528
530 bool
532 {
533 std::unique_ptr<PCStateBase> next_pc(pc->clone());
534 staticInst->advancePC(*next_pc);
535 return *next_pc != *predPC;
536 }
537
538 //
539 // Instruction types. Forward checks to StaticInst object.
540 //
541 bool isNop() const { return staticInst->isNop(); }
542 bool isMemRef() const { return staticInst->isMemRef(); }
543 bool isLoad() const { return staticInst->isLoad(); }
544 bool isStore() const { return staticInst->isStore(); }
545 bool isAtomic() const { return staticInst->isAtomic(); }
547 { return staticInst->isStoreConditional(); }
548 bool isInstPrefetch() const { return staticInst->isInstPrefetch(); }
549 bool isDataPrefetch() const { return staticInst->isDataPrefetch(); }
550 bool isInteger() const { return staticInst->isInteger(); }
551 bool isFloating() const { return staticInst->isFloating(); }
552 bool isVector() const { return staticInst->isVector(); }
553 bool isControl() const { return staticInst->isControl(); }
554 bool isCall() const { return staticInst->isCall(); }
555 bool isReturn() const { return staticInst->isReturn(); }
556 bool isDirectCtrl() const { return staticInst->isDirectCtrl(); }
557 bool isIndirectCtrl() const { return staticInst->isIndirectCtrl(); }
558 bool isCondCtrl() const { return staticInst->isCondCtrl(); }
559 bool isUncondCtrl() const { return staticInst->isUncondCtrl(); }
560 bool isSerializing() const { return staticInst->isSerializing(); }
561 bool
566 bool
568 {
570 }
571 bool isSquashAfter() const { return staticInst->isSquashAfter(); }
572 bool isFullMemBarrier() const { return staticInst->isFullMemBarrier(); }
573 bool isReadBarrier() const { return staticInst->isReadBarrier(); }
574 bool isWriteBarrier() const { return staticInst->isWriteBarrier(); }
575 bool isNonSpeculative() const { return staticInst->isNonSpeculative(); }
576 bool isQuiesce() const { return staticInst->isQuiesce(); }
577 bool isUnverifiable() const { return staticInst->isUnverifiable(); }
578 bool isSyscall() const { return staticInst->isSyscall(); }
579 bool isMacroop() const { return staticInst->isMacroop(); }
580 bool isMicroop() const { return staticInst->isMicroop(); }
581 bool isDelayedCommit() const { return staticInst->isDelayedCommit(); }
582 bool isLastMicroop() const { return staticInst->isLastMicroop(); }
583 bool isFirstMicroop() const { return staticInst->isFirstMicroop(); }
584 // hardware transactional memory
585 bool isHtmStart() const { return staticInst->isHtmStart(); }
586 bool isHtmStop() const { return staticInst->isHtmStop(); }
587 bool isHtmCancel() const { return staticInst->isHtmCancel(); }
588 bool isHtmCmd() const { return staticInst->isHtmCmd(); }
589
590 uint64_t
591 getHtmTransactionUid() const override
592 {
594 return htmUid;
595 }
596
597 uint64_t
598 newHtmTransactionUid() const override
599 {
600 panic("Not yet implemented\n");
601 return 0;
602 }
603
604 bool
605 inHtmTransactionalState() const override
606 {
608 }
609
610 uint64_t
612 {
614 return htmDepth;
615 else
616 return 0;
617 }
618
619 void
620 setHtmTransactionalState(uint64_t htm_uid, uint64_t htm_depth)
621 {
623 htmUid = htm_uid;
624 htmDepth = htm_depth;
625 }
626
627 void
629 {
631 DPRINTF(HtmCpu,
632 "clearing instuction's transactional state htmUid=%u\n",
634
636 htmUid = -1;
637 htmDepth = 0;
638 }
639 }
640
643
646
649
652
655
658
661
668
670 OpClass opClass() const { return staticInst->opClass(); }
671
673 std::unique_ptr<PCStateBase>
675 {
676 return staticInst->branchTarget(*pc);
677 }
678
680 size_t numSrcRegs() const { return numSrcs(); }
681
683 size_t numDestRegs() const { return numDests(); }
684
685 size_t
687 {
688 return staticInst->numDestRegs(type);
689 }
690
692 const RegId& destRegIdx(int i) const { return staticInst->destRegIdx(i); }
693
695 const RegId& srcRegIdx(int i) const { return staticInst->srcRegIdx(i); }
696
698 uint8_t resultSize() { return instResult.size(); }
699
705 {
706 if (!instResult.empty()) {
707 InstResult t = instResult.front();
708 instResult.pop();
709 return t;
710 }
711 return dflt;
712 }
713
716 template<typename T>
717 void
718 setResult(const RegClass &reg_class, T &&t)
719 {
720 if (instFlags[RecordResult]) {
721 instResult.emplace(reg_class, std::forward<T>(t));
722 }
723 }
727 void markSrcRegReady();
728
730 void markSrcRegReady(RegIndex src_idx);
731
734
736 bool isCompleted() const { return status[Completed]; }
737
740
742 bool isResultReady() const { return status[ResultReady]; }
743
745 void setCanIssue() { status.set(CanIssue); }
746
748 bool readyToIssue() const { return status[CanIssue]; }
749
751 void clearCanIssue() { status.reset(CanIssue); }
752
754 void setIssued() { status.set(Issued); }
755
757 bool isIssued() const { return status[Issued]; }
758
760 void clearIssued() { status.reset(Issued); }
761
763 void setExecuted() { status.set(Executed); }
764
766 bool isExecuted() const { return status[Executed]; }
767
770
772 void clearCanCommit() { status.reset(CanCommit); }
773
775 bool readyToCommit() const { return status[CanCommit]; }
776
777 void setAtCommit() { status.set(AtCommit); }
778
779 bool isAtCommit() { return status[AtCommit]; }
780
783
785 bool isCommitted() const { return status[Committed]; }
786
788 void setSquashed();
789
791 bool isSquashed() const { return status[Squashed]; }
792
793 //Instruction Queue Entry
794 //-----------------------
796 void setInIQ() { status.set(IqEntry); }
797
799 void clearInIQ() { status.reset(IqEntry); }
800
802 bool isInIQ() const { return status[IqEntry]; }
803
806
808 bool isSquashedInIQ() const { return status[SquashedInIQ]; }
809
810
811 //Load / Store Queue Functions
812 //-----------------------
814 void setInLSQ() { status.set(LsqEntry); }
815
817 void removeInLSQ() { status.reset(LsqEntry); }
818
820 bool isInLSQ() const { return status[LsqEntry]; }
821
824
826 bool isSquashedInLSQ() const { return status[SquashedInLSQ]; }
827
828
829 //Reorder Buffer Functions
830 //-----------------------
832 void setInROB() { status.set(RobEntry); }
833
835 void clearInROB() { status.reset(RobEntry); }
836
838 bool isInROB() const { return status[RobEntry]; }
839
842
844 bool isSquashedInROB() const { return status[SquashedInROB]; }
845
850
854 bool noCapableFU() const { return instFlags[NoCapableFU]; }
855
858
860 void
867
870
872 void
879
881 bool
883 {
885 }
886
888 void
894
896 const PCStateBase &
897 pcState() const override
898 {
899 return *pc;
900 }
901
903 void pcState(const PCStateBase &val) override { set(pc, val); }
904
905 bool readPredicate() const override { return instFlags[Predicate]; }
906
907 void
908 setPredicate(bool val) override
909 {
911
912 if (traceData) {
914 }
915 }
916
917 bool
918 readMemAccPredicate() const override
919 {
921 }
922
923 void
924 setMemAccPredicate(bool val) override
925 {
927 }
928
930 void setTid(ThreadID tid) { threadNumber = tid; }
931
934
936 gem5::ThreadContext *tcBase() const override { return thread->getTC(); }
937
938 public:
942
944 bool hasRequest() const { return instFlags[ReqMade]; }
946 void setRequest() { instFlags[ReqMade] = true; }
947
950
952 void setInstListIt(ListIt _instListIt) { instListIt = _instListIt; }
953
954 public:
956 unsigned int
957 readStCondFailures() const override
958 {
960 }
961
963 void
964 setStCondFailures(unsigned int sc_failures) override
965 {
966 thread->storeCondFailures = sc_failures;
967 }
968
969 public:
970 // monitor/mwait funtions
971 void
972 armMonitor(Addr address) override
973 {
974 cpu->armMonitor(threadNumber, address);
975 }
976 bool
977 mwait(PacketPtr pkt) override
978 {
979 return cpu->mwait(threadNumber, pkt);
980 }
981 void
983 {
984 return cpu->mwaitAtomic(threadNumber, tc, cpu->mmu);
985 }
987 getAddrMonitor() override
988 {
990 }
991
992 private:
993 // hardware transactional memory
994 uint64_t htmUid = -1;
995 uint64_t htmDepth = 0;
996
997 public:
998#if TRACING_ON
999 // Value -1 indicates that particular phase
1000 // hasn't happened (yet).
1002 Tick fetchTick = -1; // instruction fetch is completed.
1003 int32_t decodeTick = -1; // instruction enters decode phase
1004 int32_t renameTick = -1; // instruction enters rename phase
1005 int32_t dispatchTick = -1;
1006 int32_t issueTick = -1;
1007 int32_t completeTick = -1;
1008 int32_t commitTick = -1;
1009 int32_t storeTick = -1;
1010#endif
1011
1012 /* Values used by LoadToUse stat */
1015
1019 RegVal
1020 readMiscReg(int misc_reg) override
1021 {
1022 return cpu->readMiscReg(misc_reg, threadNumber);
1023 }
1024
1028 void
1029 setMiscReg(int misc_reg, RegVal val) override
1030 {
1037 for (auto &idx: _destMiscRegIdx) {
1038 if (idx == misc_reg)
1039 return;
1040 }
1041
1042 _destMiscRegIdx.push_back(misc_reg);
1043 _destMiscRegVal.push_back(val);
1044 }
1045
1049 RegVal
1050 readMiscRegOperand(const StaticInst *si, int idx) override
1051 {
1052 const RegId& reg = si->srcRegIdx(idx);
1053 assert(reg.is(MiscRegClass));
1054 return cpu->readMiscReg(reg.index(), threadNumber);
1055 }
1056
1060 void
1061 setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
1062 {
1063 const RegId& reg = si->destRegIdx(idx);
1064 assert(reg.is(MiscRegClass));
1065 setMiscReg(reg.index(), val);
1066 }
1067
1069 void
1071 {
1072 // @todo: Pretty convoluted way to avoid squashing from happening when
1073 // using the TC during an instruction's execution (specifically for
1074 // instructions that have side-effects that use the TC). Fix this.
1075 // See cpu/o3/dyn_inst_impl.hh.
1076 bool no_squash_from_TC = thread->noSquashFromTC;
1077 thread->noSquashFromTC = true;
1078
1079 for (int i = 0; i < _destMiscRegIdx.size(); i++)
1080 cpu->setMiscReg(
1082
1083 thread->noSquashFromTC = no_squash_from_TC;
1084 }
1085
1086 void
1088 {
1089
1090 for (int idx = 0; idx < numDestRegs(); idx++) {
1091 PhysRegIdPtr prev_phys_reg = prevDestIdx(idx);
1092 const RegId& original_dest_reg = staticInst->destRegIdx(idx);
1093 const auto bytes = original_dest_reg.regClass().regBytes();
1094
1095 // Registers which aren't renamed don't need to be forwarded.
1096 if (!original_dest_reg.isRenameable())
1097 continue;
1098
1099 if (bytes == sizeof(RegVal)) {
1101 cpu->getReg(prev_phys_reg, threadNumber));
1102 } else {
1103 uint8_t val[original_dest_reg.regClass().regBytes()];
1104 cpu->getReg(prev_phys_reg, val, threadNumber);
1106 }
1107 }
1108 }
1110 void trap(const Fault &fault);
1111
1112 public:
1113
1114 // The register accessor methods provide the index of the
1115 // instruction's operand (e.g., 0 or 1), not the architectural
1116 // register index, to simplify the implementation of register
1117 // renaming. We find the architectural register index by indexing
1118 // into the instruction's own operand index table. Note that a
1119 // raw pointer to the StaticInst is provided instead of a
1120 // ref-counted StaticInstPtr to redice overhead. This is fine as
1121 // long as these methods don't copy the pointer into any long-term
1122 // storage (which is pretty hard to imagine they would have reason
1123 // to do).
1124
1125 RegVal
1126 getRegOperand(const StaticInst *si, int idx) override
1127 {
1128 const PhysRegIdPtr reg = renamedSrcIdx(idx);
1129 if (reg->is(InvalidRegClass))
1130 return 0;
1131 return cpu->getReg(reg, threadNumber);
1132 }
1133
1134 void
1135 getRegOperand(const StaticInst *si, int idx, void *val) override
1136 {
1137 const PhysRegIdPtr reg = renamedSrcIdx(idx);
1138 if (reg->is(InvalidRegClass))
1139 return;
1141 }
1142
1143 void *
1144 getWritableRegOperand(const StaticInst *si, int idx) override
1145 {
1147 }
1148
1152 void
1153 setRegOperand(const StaticInst *si, int idx, RegVal val) override
1154 {
1155 const PhysRegIdPtr reg = renamedDestIdx(idx);
1156 if (reg->is(InvalidRegClass))
1157 return;
1159 setResult(reg->regClass(), val);
1160 }
1161
1162 void
1163 setRegOperand(const StaticInst *si, int idx, const void *val) override
1164 {
1165 const PhysRegIdPtr reg = renamedDestIdx(idx);
1166 if (reg->is(InvalidRegClass))
1167 return;
1169 setResult(reg->regClass(), val);
1170 }
1171};
1172
1173} // namespace o3
1174} // namespace gem5
1175
1176#endif // __CPU_O3_DYN_INST_HH__
#define DPRINTF(x,...)
Definition trace.hh:209
const char data[]
RequestorID dataRequestorId() const
Reads this CPU's unique data requestor ID.
Definition base.hh:218
uint32_t socketId() const
Reads this CPU's Socket ID.
Definition base.hh:215
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseMMU *mmu)
Definition base.cc:287
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
Definition base.hh:683
bool mwait(ThreadID tid, PacketPtr pkt)
Definition base.cc:264
int cpuId() const
Reads this CPU's ID.
Definition base.hh:212
void armMonitor(ThreadID tid, Addr address)
Definition base.cc:252
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:944
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:736
const RegId & flattenedDestIdx(int idx) const
Definition dyn_inst.hh:248
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:546
unsigned memReqFlags
The memory request flags (from translation).
Definition dyn_inst.hh:343
bool isDirectCtrl() const
Definition dyn_inst.hh:556
bool isMicroop() const
Definition dyn_inst.hh:580
size_t numDestRegs(RegClassType type) const
Definition dyn_inst.hh:686
RequestPtr reqToVerify
Definition dyn_inst.hh:369
bool isHtmStart() const
Definition dyn_inst.hh:585
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
Reads a misc.
Definition dyn_inst.hh:1050
bool isCondCtrl() const
Definition dyn_inst.hh:558
@ 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:571
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:754
ThreadState * thread
Pointer to the thread state.
Definition dyn_inst.hh:135
bool isIndirectCtrl() const
Definition dyn_inst.hh:557
void clearCanIssue()
Clears this instruction being able to issue.
Definition dyn_inst.hh:751
void clearSerializeAfter()
Clears the serializeAfter part of this instruction.
Definition dyn_inst.hh:654
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:559
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:799
void setSerializeBefore()
Temporarily sets this instruction as a serialize before instruction.
Definition dyn_inst.hh:642
void clearHtmTransactionalState()
Definition dyn_inst.hh:628
void setTid(ThreadID tid)
Sets the thread id.
Definition dyn_inst.hh:930
bool readyToIssue() const
Returns whether or not this instruction is ready to issue.
Definition dyn_inst.hh:748
void translationCompleted(bool f)
Definition dyn_inst.hh:421
bool isLoad() const
Definition dyn_inst.hh:543
uint64_t htmDepth
Definition dyn_inst.hh:995
@ 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:718
bool isMemRef() const
Definition dyn_inst.hh:542
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:940
bool readPredicate() const override
Definition dyn_inst.hh:905
void getRegOperand(const StaticInst *si, int idx, void *val) override
Definition dyn_inst.hh:1135
bool isFirstMicroop() const
Definition dyn_inst.hh:583
bool isInstPrefetch() const
Definition dyn_inst.hh:548
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:933
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:1163
bool isDataPrefetch() const
Definition dyn_inst.hh:549
bool isSquashedInROB() const
Returns whether or not this instruction is squashed in the ROB.
Definition dyn_inst.hh:844
RegVal readMiscReg(int misc_reg) override
Reads a misc.
Definition dyn_inst.hh:1020
void updateMiscRegs()
Called at the commit stage to update the misc.
Definition dyn_inst.hh:1070
bool isPinnedRegsRenamed() const
Returns whether pinned registers are renamed.
Definition dyn_inst.hh:857
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
Definition dyn_inst.hh:964
bool isReadBarrier() const
Definition dyn_inst.hh:573
void strictlyOrdered(bool so)
Definition dyn_inst.hh:941
bool isLastMicroop() const
Definition dyn_inst.hh:582
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:1126
ListIt & getInstListIt()
Returns iterator to this instruction in the list of all insts.
Definition dyn_inst.hh:949
void setNoCapableFU()
Mark this instruction as having attempted to execute but CPU did not have a capable functional unit.
Definition dyn_inst.hh:849
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:982
size_t numDestRegs() const
Returns the number of destination registers.
Definition dyn_inst.hh:683
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:660
void setExecuted()
Sets this instruction as executed.
Definition dyn_inst.hh:763
bool isUnverifiable() const
Definition dyn_inst.hh:577
uint64_t newHtmTransactionUid() const override
Definition dyn_inst.hh:598
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:572
bool isCall() const
Definition dyn_inst.hh:554
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:698
void dump()
Dumps out contents of this BaseDynInst.
Definition dyn_inst.cc:287
bool isHtmStop() const
Definition dyn_inst.hh:586
void setInROB()
Sets this instruction as a entry the ROB.
Definition dyn_inst.hh:832
bool isSquashedInIQ() const
Returns whether or not this instruction is squashed in the IQ.
Definition dyn_inst.hh:808
void setResultReady()
Marks the result as ready.
Definition dyn_inst.hh:739
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:651
void setSquashedInROB()
Sets this instruction as squashed in the ROB.
Definition dyn_inst.hh:841
void setPinnedRegsWritten()
Sets destination registers as written.
Definition dyn_inst.hh:873
bool effAddrValid() const
Is the effective virtual address valid.
Definition dyn_inst.hh:376
bool isSerializing() const
Definition dyn_inst.hh:560
void setRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition dyn_inst.hh:1153
bool isNop() const
Definition dyn_inst.hh:541
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:936
bool isSerializeAfter() const
Definition dyn_inst.hh:567
uint64_t getHtmTransactionalDepth() const override
Definition dyn_inst.hh:611
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:648
bool isSerializeHandled()
Checks if the serialization part of this instruction has been handled.
Definition dyn_inst.hh:667
bool isInROB() const
Returns whether or not this instruction is in the ROB.
Definition dyn_inst.hh:838
bool isWriteBarrier() const
Definition dyn_inst.hh:574
bool isInIQ() const
Returns whether or not this instruction has issued.
Definition dyn_inst.hh:802
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:544
void effAddrValid(bool b)
Definition dyn_inst.hh:377
void setPredicate(bool val) override
Definition dyn_inst.hh:908
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets a misc.
Definition dyn_inst.hh:1061
void setSquashedInIQ()
Sets this instruction as squashed in the IQ.
Definition dyn_inst.hh:805
void pcState(const PCStateBase &val) override
Set the PC state of this instruction.
Definition dyn_inst.hh:903
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:742
void armMonitor(Addr address) override
Definition dyn_inst.hh:972
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:820
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:757
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:826
void setCompleted()
Sets this instruction as completed.
Definition dyn_inst.hh:733
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:882
bool isHtmCmd() const
Definition dyn_inst.hh:588
PhysRegIdPtr renamedDestIdx(int idx) const
Definition dyn_inst.hh:264
void setCanCommit()
Sets this instruction as ready to commit.
Definition dyn_inst.hh:769
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
Definition dyn_inst.hh:957
bool isTempSerializeAfter()
Checks if this serializeAfter is only temporarily set.
Definition dyn_inst.hh:657
void clearIssued()
Clears this instruction as being issued.
Definition dyn_inst.hh:760
bool isSerializeBefore() const
Definition dyn_inst.hh:562
uint64_t getHtmTransactionUid() const override
Definition dyn_inst.hh:591
bool isControl() const
Definition dyn_inst.hh:553
bool readyToCommit() const
Returns whether or not this instruction is ready to commit.
Definition dyn_inst.hh:775
std::bitset< NumStatus > status
The status of this BaseDynInst.
Definition dyn_inst.hh:200
void setPredTaken(bool predicted_taken)
Definition dyn_inst.hh:524
const PCStateBase & readPredTarg()
Definition dyn_inst.hh:518
void setPinnedRegsRenamed()
Sets the destination registers as renamed.
Definition dyn_inst.hh:861
void setInstListIt(ListIt _instListIt)
Sets iterator for this instruction in the list of all insts.
Definition dyn_inst.hh:952
const PCStateBase & pcState() const override
Read the PC state of this instruction.
Definition dyn_inst.hh:897
bool isInteger() const
Definition dyn_inst.hh:550
void prevDestIdx(int idx, PhysRegIdPtr phys_reg_id)
Definition dyn_inst.hh:286
bool isDelayedCommit() const
Definition dyn_inst.hh:581
LSQUnit::LQIterator lqIt
Definition dyn_inst.hh:353
bool isMacroop() const
Definition dyn_inst.hh:579
std::unique_ptr< PCStateBase > branchTarget() const
Returns the branch target address.
Definition dyn_inst.hh:674
void setPinnedRegsSquashDone()
Sets dest registers' status updated after squash.
Definition dyn_inst.hh:889
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:785
bool isSquashed() const
Returns whether or not this instruction is squashed.
Definition dyn_inst.hh:791
bool isExecuted() const
Returns whether or not this instruction has executed.
Definition dyn_inst.hh:766
bool mispredicted()
Returns whether the instruction mispredicted.
Definition dyn_inst.hh:531
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:869
void clearCanCommit()
Clears this instruction as being ready to commit.
Definition dyn_inst.hh:772
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:946
void setSquashedInLSQ()
Sets this instruction as squashed in the LSQ.
Definition dyn_inst.hh:823
bool isNonSpeculative() const
Definition dyn_inst.hh:575
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:587
bool noCapableFU() const
Returns whether or not this instruction attempted to execute and found not capable FU.
Definition dyn_inst.hh:854
void clearInROB()
Sets this instruction as a entry the ROB.
Definition dyn_inst.hh:835
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:1144
bool isSyscall() const
Definition dyn_inst.hh:578
size_t numSrcRegs() const
Returns the number of source registers.
Definition dyn_inst.hh:680
void removeInLSQ()
Sets this instruction as a entry the LSQ.
Definition dyn_inst.hh:817
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:555
void setMiscReg(int misc_reg, RegVal val) override
Sets a misc.
Definition dyn_inst.hh:1029
bool isFloating() const
Definition dyn_inst.hh:551
void setInLSQ()
Sets this instruction as a entry the LSQ.
Definition dyn_inst.hh:814
bool readPredTaken()
Returns whether the instruction was predicted taken or not.
Definition dyn_inst.hh:521
const RegId & srcRegIdx(int i) const
Returns the logical register index of the i'th source register.
Definition dyn_inst.hh:695
PhysRegIdPtr * _destIdx
Definition dyn_inst.hh:229
bool mwait(PacketPtr pkt) override
Definition dyn_inst.hh:977
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:924
Fault initiateAcc()
Initiates the access.
Definition dyn_inst.cc:365
bool readMemAccPredicate() const override
Definition dyn_inst.hh:918
bool isAtomic() const
Definition dyn_inst.hh:545
void clearSerializeBefore()
Clears the serializeBefore part of this instruction.
Definition dyn_inst.hh:645
void setInIQ()
Sets this instruction as a entry the IQ.
Definition dyn_inst.hh:796
AddressMonitor * getAddrMonitor() override
Definition dyn_inst.hh:987
bool isVector() const
Definition dyn_inst.hh:552
bool inHtmTransactionalState() const override
Definition dyn_inst.hh:605
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:745
size_t numDests() const
Definition dyn_inst.hh:243
void setHtmTransactionalState(uint64_t htm_uid, uint64_t htm_depth)
Definition dyn_inst.hh:620
void setCommitted()
Sets this instruction as committed.
Definition dyn_inst.hh:782
PhysRegIdPtr * _srcIdx
Definition dyn_inst.hh:236
bool isQuiesce() const
Definition dyn_inst.hh:576
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:692
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:670
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:704
uint32_t socketId() const
Read this CPU's Socket ID.
Definition dyn_inst.hh:494
CircularQueue< LQEntry >::iterator LQIterator
Definition lsq_unit.hh:564
CircularQueue< SQEntry >::iterator SQIterator
Definition lsq_unit.hh:565
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 Arm Limited All rights reserved.
Definition binary32.hh:36
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
uint16_t RegIndex
Definition types.hh:176
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
uint64_t RegVal
Definition types.hh:173
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.
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 Mon Jan 13 2025 04:28:31 for gem5 by doxygen 1.9.8