ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
CPU.h
Go to the documentation of this file.
1 
54 #ifndef ETISS_INCLUDE_JIT_CPU_H_
55 #define ETISS_INCLUDE_JIT_CPU_H_
56 
57 #include "etiss/jit/types.h"
58 
59 #define ETISS_MAX_RESOURCES ((int)100)
60 
61 #ifdef __cplusplus
62 extern "C"
63 {
64 #endif
65 
66 #pragma pack(push, 1) // NEVER ALLOW ALIGNMENT OF STRUCTURE MEMBERS
88  struct ETISS_CPU
89  {
90 
92  instructionPointer;
94 
95  etiss_uint64 nextPc;
96 
97  etiss_uint64 cpuTime_ps;
98 
99  etiss_uint64 resourceUsages[ETISS_MAX_RESOURCES];
100 
101  const char *resources[ETISS_MAX_RESOURCES];
102 
104 
105  etiss_uint64 cpuCycleTime_ps;
106 
107  void *_etiss_private_handle_;
108 
110 
111  etiss_uint32 exception; // currently active exception of the processor
112  etiss_uint32 return_pending; // flags whether a return from the JIT code is needed
113  };
114 #pragma pack(pop)
115 
116  typedef struct ETISS_CPU ETISS_CPU;
117 
119  const char *registerName); // implemented in CPUArch.cpp
120 
121 #ifdef __cplusplus
122 }
123 #endif
124 
125 #endif
void ETISS_signalChangedRegisterValue(ETISS_CPU *cpu, const char *registerName)
Definition: CPUArch.cpp:198
uint64_t etiss_uint64
Definition: types.h:96
uint32_t etiss_uint32
Definition: types.h:93
#define ETISS_MAX_RESOURCES
Definition: CPU.h:59
basic cpu state structure needed for execution of any cpu architecture.
Definition: CPU.h:89