ExecContext

From M5

Jump to: navigation, search

The ExecContext describes the interface that the ISA uses to access CPU state. Although there is a file src/cpu/exec_context.hh, it is purely for documentation purposes and classes do not derive from it. Instead, ExecContext is an implicit interface that is assumed by the ISA.

The ExecContext interface provides:

  • Methods to read and write the PC, next-PC, and next next-PC
  • Methods to read and write integer and floating point registers, given the parameters of a StaticInst, and an index into the StaticInst's array of source or destination register indices
  • Methods to read and write miscellaneous registers
  • Methods to read and write memory
  • Various methods to support execution, such as recording and returning effective addresses, prefetching, and handling a syscall
  • Methods to handle full-system mode, such as hwrei, reading/writing the interrupt flags, and checking simulator pal calls

Example implementations of the ExecContext interface include:

See the ISA description page for more details about how the ISA is written and generates code.

Personal tools