gem5  v20.1.0.0
thread_context.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2012, 2016-2018, 2020 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_THREAD_CONTEXT_HH__
43 #define __CPU_O3_THREAD_CONTEXT_HH__
44 
45 #include "config/the_isa.hh"
46 #include "cpu/o3/isa_specific.hh"
47 #include "cpu/thread_context.hh"
48 
62 template <class Impl>
63 class O3ThreadContext : public ThreadContext
64 {
65  public:
66  typedef typename Impl::O3CPU O3CPU;
67 
70 
71  bool
72  schedule(PCEvent *e) override
73  {
74  return thread->pcEventQueue.schedule(e);
75  }
76  bool
77  remove(PCEvent *e) override
78  {
79  return thread->pcEventQueue.remove(e);
80  }
81 
82  void
84  {
85  thread->comInstEventQueue.schedule(event, count);
86  }
87  void
89  {
90  thread->comInstEventQueue.deschedule(event);
91  }
92  Tick
94  {
95  return thread->comInstEventQueue.getCurTick();
96  }
97 
100 
102  BaseTLB *getITBPtr() override { return cpu->itb; }
103 
105  BaseTLB *getDTBPtr() override { return cpu->dtb; }
106 
107  CheckerCPU *getCheckerCpuPtr() override { return NULL; }
108 
109  BaseISA *
110  getIsaPtr() override
111  {
112  return cpu->isa[thread->threadId()];
113  }
114 
115  TheISA::Decoder *
116  getDecoderPtr() override
117  {
118  return cpu->fetch.decoder[thread->threadId()];
119  }
120 
122  BaseCPU *getCpuPtr() override { return cpu; }
123 
125  int cpuId() const override { return cpu->cpuId(); }
126 
128  uint32_t socketId() const override { return cpu->socketId(); }
129 
130  ContextID contextId() const override { return thread->contextId(); }
131 
132  void setContextId(ContextID id) override { thread->setContextId(id); }
133 
135  int threadId() const override { return thread->threadId(); }
136  void setThreadId(int id) override { return thread->setThreadId(id); }
137 
139  System *getSystemPtr() override { return cpu->system; }
140 
142  Process *getProcessPtr() override { return thread->getProcessPtr(); }
143 
144  void setProcessPtr(Process *p) override { thread->setProcessPtr(p); }
145 
146  PortProxy &getPhysProxy() override { return thread->getPhysProxy(); }
147 
148  PortProxy &getVirtProxy() override;
149 
150  void
152  {
153  thread->initMemProxies(tc);
154  }
155 
157  Status status() const override { return thread->status(); }
158 
160  void
161  setStatus(Status new_status) override
162  {
163  thread->setStatus(new_status);
164  }
165 
167  void activate() override;
168 
170  void suspend() override;
171 
173  void halt() override;
174 
176  void takeOverFrom(ThreadContext *old_context) override;
177 
179  Tick readLastActivate() override;
181  Tick readLastSuspend() override;
182 
184  void copyArchRegs(ThreadContext *tc) override;
185 
187  void clearArchRegs() override;
188 
190  RegVal
191  readReg(RegIndex reg_idx)
192  {
194  reg_idx)).index());
195  }
196  RegVal
197  readIntReg(RegIndex reg_idx) const override
198  {
200  reg_idx)).index());
201  }
202 
203  RegVal
204  readFloatReg(RegIndex reg_idx) const override
205  {
207  reg_idx)).index());
208  }
209 
210  const VecRegContainer &
211  readVecReg(const RegId& id) const override
212  {
213  return readVecRegFlat(flattenRegId(id).index());
214  }
215 
220  getWritableVecReg(const RegId& id) override
221  {
223  }
224 
229  readVec8BitLaneReg(const RegId& id) const override
230  {
231  return readVecLaneFlat<uint8_t>(flattenRegId(id).index(),
232  id.elemIndex());
233  }
234 
237  readVec16BitLaneReg(const RegId& id) const override
238  {
239  return readVecLaneFlat<uint16_t>(flattenRegId(id).index(),
240  id.elemIndex());
241  }
242 
245  readVec32BitLaneReg(const RegId& id) const override
246  {
247  return readVecLaneFlat<uint32_t>(flattenRegId(id).index(),
248  id.elemIndex());
249  }
250 
253  readVec64BitLaneReg(const RegId& id) const override
254  {
255  return readVecLaneFlat<uint64_t>(flattenRegId(id).index(),
256  id.elemIndex());
257  }
258 
260  void
262  const LaneData<LaneSize::Byte>& val) override
263  {
264  return setVecLaneFlat(flattenRegId(reg).index(), reg.elemIndex(), val);
265  }
266  void
268  const LaneData<LaneSize::TwoByte>& val) override
269  {
270  return setVecLaneFlat(flattenRegId(reg).index(), reg.elemIndex(), val);
271  }
272  void
274  const LaneData<LaneSize::FourByte>& val) override
275  {
276  return setVecLaneFlat(flattenRegId(reg).index(), reg.elemIndex(), val);
277  }
278  void
280  const LaneData<LaneSize::EightByte>& val) override
281  {
282  return setVecLaneFlat(flattenRegId(reg).index(), reg.elemIndex(), val);
283  }
286  const VecElem &
287  readVecElem(const RegId& reg) const override
288  {
289  return readVecElemFlat(flattenRegId(reg).index(), reg.elemIndex());
290  }
291 
292  const VecPredRegContainer &
293  readVecPredReg(const RegId& id) const override
294  {
295  return readVecPredRegFlat(flattenRegId(id).index());
296  }
297 
299  getWritableVecPredReg(const RegId& id) override
300  {
302  }
303 
304  RegVal
305  readCCReg(RegIndex reg_idx) const override
306  {
308  reg_idx)).index());
309  }
310 
312  void
313  setIntReg(RegIndex reg_idx, RegVal val) override
314  {
316  }
317 
318  void
319  setFloatReg(RegIndex reg_idx, RegVal val) override
320  {
322  reg_idx)).index(), val);
323  }
324 
325  void
326  setVecReg(const RegId& reg, const VecRegContainer& val) override
327  {
329  }
330 
331  void
332  setVecElem(const RegId& reg, const VecElem& val) override
333  {
334  setVecElemFlat(flattenRegId(reg).index(), reg.elemIndex(), val);
335  }
336 
337  void
339  const VecPredRegContainer& val) override
340  {
342  }
343 
344  void
345  setCCReg(RegIndex reg_idx, RegVal val) override
346  {
348  }
349 
352  pcState() const override
353  {
354  return cpu->pcState(thread->threadId());
355  }
356 
358  void pcState(const TheISA::PCState &val) override;
359 
360  void pcStateNoRecord(const TheISA::PCState &val) override;
361 
363  Addr
364  instAddr() const override
365  {
366  return cpu->instAddr(thread->threadId());
367  }
368 
370  Addr
371  nextInstAddr() const override
372  {
373  return cpu->nextInstAddr(thread->threadId());
374  }
375 
377  MicroPC
378  microPC() const override
379  {
380  return cpu->microPC(thread->threadId());
381  }
382 
384  RegVal
385  readMiscRegNoEffect(RegIndex misc_reg) const override
386  {
387  return cpu->readMiscRegNoEffect(misc_reg, thread->threadId());
388  }
389 
392  RegVal
393  readMiscReg(RegIndex misc_reg) override
394  {
395  return cpu->readMiscReg(misc_reg, thread->threadId());
396  }
397 
399  void setMiscRegNoEffect(RegIndex misc_reg, RegVal val) override;
400 
403  void setMiscReg(RegIndex misc_reg, RegVal val) override;
404 
405  RegId flattenRegId(const RegId& regId) const override;
406 
408  // @todo: Figure out where these store cond failures should go.
409  unsigned
410  readStCondFailures() const override
411  {
412  return thread->storeCondFailures;
413  }
414 
416  void
417  setStCondFailures(unsigned sc_failures) override
418  {
419  thread->storeCondFailures = sc_failures;
420  }
421 
423  void
424  syscall() override
425  {
426  return cpu->syscall(thread->threadId());
427  }
428 
430  Counter readFuncExeInst() const override { return thread->funcExeInst; }
431 
437  inline void
439  {
440  if (!thread->trapPending && !thread->noSquashFromTC)
441  cpu->squashFromTC(thread->threadId());
442  }
443 
444  RegVal readIntRegFlat(RegIndex idx) const override;
445  void setIntRegFlat(RegIndex idx, RegVal val) override;
446 
447  RegVal readFloatRegFlat(RegIndex idx) const override;
448  void setFloatRegFlat(RegIndex idx, RegVal val) override;
449 
450  const VecRegContainer& readVecRegFlat(RegIndex idx) const override;
453  void setVecRegFlat(RegIndex idx, const VecRegContainer& val) override;
454 
455  template <typename VecElem>
457  readVecLaneFlat(RegIndex idx, int lId) const
458  {
459  return cpu->template readArchVecLane<VecElem>(idx, lId,
460  thread->threadId());
461  }
462 
463  template <typename LD>
464  void
465  setVecLaneFlat(int idx, int lId, const LD& val)
466  {
467  cpu->template setArchVecLane(idx, lId, thread->threadId(), val);
468  }
469 
470  const VecElem &readVecElemFlat(RegIndex idx,
471  const ElemIndex& elemIndex) const override;
472  void setVecElemFlat(RegIndex idx, const ElemIndex& elemIdx,
473  const VecElem& val) override;
474 
475  const VecPredRegContainer& readVecPredRegFlat(RegIndex idx) const override;
477  void setVecPredRegFlat(RegIndex idx,
478  const VecPredRegContainer& val) override;
479 
480  RegVal readCCRegFlat(RegIndex idx) const override;
481  void setCCRegFlat(RegIndex idx, RegVal val) override;
482 
483  // hardware transactional memory
484  void htmAbortTransaction(uint64_t htm_uid,
485  HtmFailureFaultCause cause) override;
487  void setHtmCheckpointPtr(BaseHTMCheckpointPtr new_cpt) override;
488 };
489 
490 #endif
O3ThreadContext::nextInstAddr
Addr nextInstAddr() const override
Reads this thread's next PC.
Definition: thread_context.hh:371
O3ThreadContext::getCpuPtr
BaseCPU * getCpuPtr() override
Returns a pointer to this CPU.
Definition: thread_context.hh:122
O3ThreadContext::setStCondFailures
void setStCondFailures(unsigned sc_failures) override
Sets the number of consecutive store conditional failures.
Definition: thread_context.hh:417
O3ThreadContext::readVecReg
const VecRegContainer & readVecReg(const RegId &id) const override
Definition: thread_context.hh:211
O3ThreadContext::setHtmCheckpointPtr
void setHtmCheckpointPtr(BaseHTMCheckpointPtr new_cpt) override
Definition: thread_context_impl.hh:348
O3ThreadContext::pcStateNoRecord
void pcStateNoRecord(const TheISA::PCState &val) override
Definition: thread_context_impl.hh:296
O3ThreadContext::getSystemPtr
System * getSystemPtr() override
Returns a pointer to the system.
Definition: thread_context.hh:139
O3ThreadContext::microPC
MicroPC microPC() const override
Reads this thread's next PC.
Definition: thread_context.hh:378
O3ThreadContext::cpuId
int cpuId() const override
Reads this CPU's ID.
Definition: thread_context.hh:125
O3ThreadContext::getWritableVecPredRegFlat
VecPredRegContainer & getWritableVecPredRegFlat(RegIndex idx) override
Definition: thread_context_impl.hh:217
VecPredRegContainer
Generic predicate register container.
Definition: vec_pred_reg.hh:47
MipsISA::index
Bitfield< 30, 0 > index
Definition: pra_constants.hh:44
O3ThreadContext::status
Status status() const override
Returns this thread's status.
Definition: thread_context.hh:157
O3ThreadContext::readCCReg
RegVal readCCReg(RegIndex reg_idx) const override
Definition: thread_context.hh:305
O3ThreadContext::readStCondFailures
unsigned readStCondFailures() const override
Returns the number of consecutive store conditional failures.
Definition: thread_context.hh:410
Process
Definition: process.hh:65
O3ThreadContext::instAddr
Addr instAddr() const override
Reads this thread's PC.
Definition: thread_context.hh:364
O3ThreadContext::setIntReg
void setIntReg(RegIndex reg_idx, RegVal val) override
Sets an integer register to a value.
Definition: thread_context.hh:313
O3ThreadContext::setVecLane
void setVecLane(const RegId &reg, const LaneData< LaneSize::FourByte > &val) override
Definition: thread_context.hh:273
O3ThreadContext::setVecElemFlat
void setVecElemFlat(RegIndex idx, const ElemIndex &elemIdx, const VecElem &val) override
Definition: thread_context_impl.hh:259
ContextID
int ContextID
Globally unique thread context ID.
Definition: types.hh:231
O3ThreadContext::readVecElem
const VecElem & readVecElem(const RegId &reg) const override
Definition: thread_context.hh:287
O3ThreadContext::contextId
ContextID contextId() const override
Definition: thread_context.hh:130
O3ThreadContext::readReg
RegVal readReg(RegIndex reg_idx)
Reads an integer register.
Definition: thread_context.hh:191
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
O3ThreadContext::setStatus
void setStatus(Status new_status) override
Sets this thread's status.
Definition: thread_context.hh:161
O3ThreadContext::O3CPU
Impl::O3CPU O3CPU
Definition: thread_context.hh:66
O3ThreadContext::readFloatRegFlat
RegVal readFloatRegFlat(RegIndex idx) const override
Definition: thread_context_impl.hh:181
CheckerCPU
CheckerCPU class.
Definition: cpu.hh:85
O3ThreadContext::setCCRegFlat
void setCCRegFlat(RegIndex idx, RegVal val) override
Definition: thread_context_impl.hh:278
O3ThreadContext::setVecReg
void setVecReg(const RegId &reg, const VecRegContainer &val) override
Definition: thread_context.hh:326
HtmFailureFaultCause
HtmFailureFaultCause
Definition: htm.hh:44
X86ISA::count
count
Definition: misc.hh:703
O3ThreadContext::readFloatReg
RegVal readFloatReg(RegIndex reg_idx) const override
Definition: thread_context.hh:204
O3ThreadContext::readVec64BitLaneReg
ConstVecLane64 readVec64BitLaneReg(const RegId &id) const override
Reads source vector 64bit operand.
Definition: thread_context.hh:253
O3ThreadContext::scheduleInstCountEvent
void scheduleInstCountEvent(Event *event, Tick count) override
Definition: thread_context.hh:83
O3ThreadContext::takeOverFrom
void takeOverFrom(ThreadContext *old_context) override
Takes over execution of a thread from another CPU.
Definition: thread_context_impl.hh:60
X86ISA::reg
Bitfield< 5, 3 > reg
Definition: types.hh:87
BaseTLB
Definition: tlb.hh:50
RegId
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:75
O3ThreadContext::halt
void halt() override
Set the status to Halted.
Definition: thread_context_impl.hh:117
O3ThreadContext::getCheckerCpuPtr
CheckerCPU * getCheckerCpuPtr() override
Definition: thread_context.hh:107
O3ThreadContext::getWritableVecPredReg
VecPredRegContainer & getWritableVecPredReg(const RegId &id) override
Definition: thread_context.hh:299
O3ThreadContext::setVecLaneFlat
void setVecLaneFlat(int idx, int lId, const LD &val)
Definition: thread_context.hh:465
O3ThreadContext::getDecoderPtr
TheISA::Decoder * getDecoderPtr() override
Definition: thread_context.hh:116
Counter
int64_t Counter
Statistics counter type.
Definition: types.hh:58
ArmISA::VecElem
uint32_t VecElem
Definition: registers.hh:68
O3ThreadContext::conditionalSquash
void conditionalSquash()
check if the cpu is currently in state update mode and squash if not.
Definition: thread_context.hh:438
O3ThreadContext::setMiscRegNoEffect
void setMiscRegNoEffect(RegIndex misc_reg, RegVal val) override
Sets a misc.
Definition: thread_context_impl.hh:312
FloatRegClass
@ FloatRegClass
Floating-point register.
Definition: reg_class.hh:54
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
O3ThreadContext::getProcessPtr
Process * getProcessPtr() override
Returns a pointer to this thread's process.
Definition: thread_context.hh:142
isa_specific.hh
O3ThreadContext::setVecPredRegFlat
void setVecPredRegFlat(RegIndex idx, const VecPredRegContainer &val) override
Definition: thread_context_impl.hh:268
Event
Definition: eventq.hh:246
VecLaneT
Vector Lane abstraction Another view of a container.
Definition: vec_reg.hh:262
O3ThreadContext::readVec16BitLaneReg
ConstVecLane16 readVec16BitLaneReg(const RegId &id) const override
Reads source vector 16bit operand.
Definition: thread_context.hh:237
O3ThreadContext::activate
void activate() override
Set the status to Active.
Definition: thread_context_impl.hh:78
System
Definition: system.hh:73
O3ThreadContext::readIntReg
RegVal readIntReg(RegIndex reg_idx) const override
Definition: thread_context.hh:197
O3ThreadContext::readLastActivate
Tick readLastActivate() override
Reads the last tick that this thread was activated on.
Definition: thread_context_impl.hh:137
O3ThreadContext::htmAbortTransaction
void htmAbortTransaction(uint64_t htm_uid, HtmFailureFaultCause cause) override
Definition: thread_context_impl.hh:331
O3ThreadContext::setVecRegFlat
void setVecRegFlat(RegIndex idx, const VecRegContainer &val) override
Definition: thread_context_impl.hh:249
MipsISA::event
Bitfield< 10, 5 > event
Definition: pra_constants.hh:297
O3ThreadContext::readVec32BitLaneReg
ConstVecLane32 readVec32BitLaneReg(const RegId &id) const override
Reads source vector 32bit operand.
Definition: thread_context.hh:245
O3ThreadContext::flattenRegId
RegId flattenRegId(const RegId &regId) const override
Definition: thread_context_impl.hh:305
O3ThreadContext::setContextId
void setContextId(ContextID id) override
Definition: thread_context.hh:132
O3ThreadContext::readVecPredReg
const VecPredRegContainer & readVecPredReg(const RegId &id) const override
Definition: thread_context.hh:293
O3ThreadState
Class that has various thread state, such as the status, the current instruction being processed,...
Definition: commit.hh:56
O3ThreadContext::readFuncExeInst
Counter readFuncExeInst() const override
Reads the funcExeInst counter.
Definition: thread_context.hh:430
O3ThreadContext::clearArchRegs
void clearArchRegs() override
Resets all architectural registers to 0.
Definition: thread_context_impl.hh:167
O3ThreadContext::getWritableVecRegFlat
VecRegContainer & getWritableVecRegFlat(RegIndex idx) override
Read vector register operand for modification, flat indexing.
Definition: thread_context_impl.hh:195
O3ThreadContext::readVecElemFlat
const VecElem & readVecElemFlat(RegIndex idx, const ElemIndex &elemIndex) const override
Definition: thread_context_impl.hh:202
X86ISA::val
Bitfield< 63 > val
Definition: misc.hh:769
O3ThreadContext::getCurrentInstCount
Tick getCurrentInstCount() override
Definition: thread_context.hh:93
O3ThreadContext::threadId
int threadId() const override
Returns this thread's ID number.
Definition: thread_context.hh:135
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
BaseHTMCheckpointPtr
std::unique_ptr< BaseHTMCheckpoint > BaseHTMCheckpointPtr
Definition: htm.hh:122
O3ThreadContext::readCCRegFlat
RegVal readCCRegFlat(RegIndex idx) const override
Definition: thread_context_impl.hh:224
O3ThreadContext::setThreadId
void setThreadId(int id) override
Definition: thread_context.hh:136
O3ThreadContext::readVecRegFlat
const VecRegContainer & readVecRegFlat(RegIndex idx) const override
Definition: thread_context_impl.hh:188
O3ThreadContext::setVecLane
void setVecLane(const RegId &reg, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector register.
Definition: thread_context.hh:261
O3ThreadContext::getITBPtr
BaseTLB * getITBPtr() override
Returns a pointer to the ITB.
Definition: thread_context.hh:102
IntRegClass
@ IntRegClass
Integer register.
Definition: reg_class.hh:53
O3ThreadContext::setIntRegFlat
void setIntRegFlat(RegIndex idx, RegVal val) override
Definition: thread_context_impl.hh:231
O3ThreadContext::getDTBPtr
BaseTLB * getDTBPtr() override
Returns a pointer to the DTB.
Definition: thread_context.hh:105
O3ThreadContext::getPhysProxy
PortProxy & getPhysProxy() override
Definition: thread_context.hh:146
CCRegClass
@ CCRegClass
Condition-code register.
Definition: reg_class.hh:60
ArmISA::e
Bitfield< 9 > e
Definition: miscregs_types.hh:61
O3ThreadContext::getHtmCheckpointPtr
BaseHTMCheckpointPtr & getHtmCheckpointPtr() override
Definition: thread_context_impl.hh:341
BaseCPU
Definition: cpu_dummy.hh:43
O3ThreadContext::descheduleInstCountEvent
void descheduleInstCountEvent(Event *event) override
Definition: thread_context.hh:88
O3ThreadContext::readIntRegFlat
RegVal readIntRegFlat(RegIndex idx) const override
Definition: thread_context_impl.hh:174
O3ThreadContext::readLastSuspend
Tick readLastSuspend() override
Reads the last tick that this thread was suspended on.
Definition: thread_context_impl.hh:144
O3ThreadContext::readVecPredRegFlat
const VecPredRegContainer & readVecPredRegFlat(RegIndex idx) const override
Definition: thread_context_impl.hh:210
O3ThreadContext::readVec8BitLaneReg
ConstVecLane8 readVec8BitLaneReg(const RegId &id) const override
Vector Register Lane Interfaces.
Definition: thread_context.hh:229
O3ThreadContext::readMiscRegNoEffect
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
Reads a miscellaneous register.
Definition: thread_context.hh:385
O3ThreadContext::setVecElem
void setVecElem(const RegId &reg, const VecElem &val) override
Definition: thread_context.hh:332
PortProxy
This object is a proxy for a port or other object which implements the functional response protocol,...
Definition: port_proxy.hh:80
O3ThreadContext::getIsaPtr
BaseISA * getIsaPtr() override
Definition: thread_context.hh:110
MipsISA::PCState
GenericISA::DelaySlotPCState< MachInst > PCState
Definition: types.hh:41
RegIndex
uint16_t RegIndex
Definition: types.hh:52
O3ThreadContext::getVirtProxy
PortProxy & getVirtProxy() override
Definition: thread_context_impl.hh:53
ElemIndex
uint16_t ElemIndex
Logical vector register elem index type.
Definition: types.hh:55
O3ThreadContext::setVecLane
void setVecLane(const RegId &reg, const LaneData< LaneSize::TwoByte > &val) override
Definition: thread_context.hh:267
O3ThreadContext::thread
O3ThreadState< Impl > * thread
Pointer to the thread state that this TC corrseponds to.
Definition: thread_context.hh:99
O3ThreadContext::suspend
void suspend() override
Set the status to Suspended.
Definition: thread_context_impl.hh:95
O3ThreadContext::setVecPredReg
void setVecPredReg(const RegId &reg, const VecPredRegContainer &val) override
Definition: thread_context.hh:338
O3ThreadContext::schedule
bool schedule(PCEvent *e) override
Definition: thread_context.hh:72
O3ThreadContext::setFloatReg
void setFloatReg(RegIndex reg_idx, RegVal val) override
Definition: thread_context.hh:319
O3ThreadContext::getWritableVecReg
VecRegContainer & getWritableVecReg(const RegId &id) override
Read vector register operand for modification, hierarchical indexing.
Definition: thread_context.hh:220
PCEvent
Definition: pc_event.hh:42
O3ThreadContext::setMiscReg
void setMiscReg(RegIndex misc_reg, RegVal val) override
Sets a misc.
Definition: thread_context_impl.hh:321
O3ThreadContext::remove
bool remove(PCEvent *e) override
Definition: thread_context.hh:77
O3ThreadContext::setProcessPtr
void setProcessPtr(Process *p) override
Definition: thread_context.hh:144
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
O3ThreadContext::setFloatRegFlat
void setFloatRegFlat(RegIndex idx, RegVal val) override
Definition: thread_context_impl.hh:240
MicroPC
uint16_t MicroPC
Definition: types.hh:144
O3ThreadContext::copyArchRegs
void copyArchRegs(ThreadContext *tc) override
Copies the architectural registers from another TC into this TC.
Definition: thread_context_impl.hh:151
O3ThreadContext::readVecLaneFlat
VecLaneT< VecElem, true > readVecLaneFlat(RegIndex idx, int lId) const
Definition: thread_context.hh:457
BaseISA
Definition: isa.hh:47
thread_context.hh
O3ThreadContext::initMemProxies
void initMemProxies(ThreadContext *tc) override
Definition: thread_context.hh:151
LaneData
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
Definition: vec_reg.hh:458
O3ThreadContext::pcState
TheISA::PCState pcState() const override
Reads this thread's PC state.
Definition: thread_context.hh:352
O3ThreadContext::cpu
O3CPU * cpu
Pointer to the CPU.
Definition: thread_context.hh:69
O3ThreadContext::readMiscReg
RegVal readMiscReg(RegIndex misc_reg) override
Reads a misc.
Definition: thread_context.hh:393
RegVal
uint64_t RegVal
Definition: types.hh:168
O3ThreadContext::setCCReg
void setCCReg(RegIndex reg_idx, RegVal val) override
Definition: thread_context.hh:345
VecRegContainer
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
Definition: vec_reg.hh:156
O3ThreadContext::socketId
uint32_t socketId() const override
Reads this CPU's Socket ID.
Definition: thread_context.hh:128
O3ThreadContext::setVecLane
void setVecLane(const RegId &reg, const LaneData< LaneSize::EightByte > &val) override
Definition: thread_context.hh:279
O3ThreadContext::syscall
void syscall() override
Executes a syscall in SE mode.
Definition: thread_context.hh:424
O3ThreadContext
Derived ThreadContext class for use with the O3CPU.
Definition: cpu.hh:71

Generated on Wed Sep 30 2020 14:01:58 for gem5 by doxygen 1.8.17