Difference between revisions of "DynInst"

From gem5
Jump to: navigation, search
m
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:
 
* Whether or not the instruction is squashed
 
* Whether or not the instruction is squashed
  
Additionally the DynInst provides the [[ExecContext]] interface.  When ISA instructions are executed, the DynInst is passed in as the ExecContext, handling all accesses of the ISA to CPU state.
+
Additionally the DynInst provides the [[Execution_Basics#ExecContext|ExecContext]] interface.  When ISA instructions are executed, the DynInst is passed in as the ExecContext, handling all accesses of the ISA to CPU state.
  
 
Detailed CPU models can derive from DynInst and create their own specific DynInst subclasses that implement any additional state or functions that might be needed.  See src/cpu/o3/alpha/dyn_inst.hh for an example of this.
 
Detailed CPU models can derive from DynInst and create their own specific DynInst subclasses that implement any additional state or functions that might be needed.  See src/cpu/o3/alpha/dyn_inst.hh for an example of this.

Latest revision as of 19:34, 5 July 2011

The DynInst is used to hold dynamic information about instructions. This is necessary for more detailed models or out-of-order models, both of which may need extra information beyond the StaticInst in order to correctly execute instructions.

Some of the dynamic information that it stores includes:

  • The PC of the instruction
  • The renamed register indices of the source and destination registers
  • The predicted next-PC
  • The instruction result
  • The thread number of the instruction
  • The CPU the instruction is executing on
  • Whether or not the instruction is squashed

Additionally the DynInst provides the ExecContext interface. When ISA instructions are executed, the DynInst is passed in as the ExecContext, handling all accesses of the ISA to CPU state.

Detailed CPU models can derive from DynInst and create their own specific DynInst subclasses that implement any additional state or functions that might be needed. See src/cpu/o3/alpha/dyn_inst.hh for an example of this.