TEMU  4.0
The Terma Emulator
Cpu.h
Go to the documentation of this file.
1 //===-- temu-c/Cpu.h - Micro-processor functions ----------------*- C++ -*-===//
2 //
3 // TEMU: The Terma Emulator
4 // (c) Terma 2015
5 // Authors: Mattias Holm <maho (at) terma.com>
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef TEMU_SUPPORT_CPU
10 #define TEMU_SUPPORT_CPU
11 #include "temu-c/Support/Attributes.h"
12 /*!
13  \file Cpu.h
14 
15  Wrappers functions for the CPU interfaces.
16 
17  The functions declared in this file exists for convenience
18  purposes. They will in general look up the relevant interface by
19  name via a double map lookup.
20 
21  The functions here provide an easy way invoke functions in the
22  CpuIface without having to query for the interface and then calling
23  the function.
24 
25  If the emulator is integrated in a simulator, the recommended
26  approach is to first construct the system, and then query relevant
27  interfaces, caching them as needed. Note that system configurations
28  should not normally change after the construction phase, so any
29  cached object-interface pairs will be stable.
30 
31  \warning A general rule is that the functions defined here calls
32  abort in-case the interface cannot be found for the relevant object.
33 */
34 
35 #include <stdint.h>
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /*!
42  Get the clock frequency for the CPU
43 
44  \warning In case the Cpu does not implement the CpuIface the program
45  will abort. Do not use this function in performance critical code!!!
46 
47  \param Cpu The CPU object
48  \result The configured clock frequency in Hz.
49  */
50 TEMU_API uint64_t temu_cpuGetFreq(void *Cpu);
51 
52 /*!
53  Set the program counter
54 
55  The program counter will be set to the supplied value.
56 
57  \note For targets with delay slots (SPARC, MIPS etc), the function
58  will also set the next PC to PC + sizeof(instruction).
59 
60  \warning In case the Cpu does not implement the CpuIface the program
61  will abort. Do not use this function in performance critical code!!!
62 
63  \param Cpu The CPU object
64  \param Pc The program counter.
65  */
66 TEMU_API void temu_cpuSetPc(void *Cpu, uint64_t Pc);
67 
68 /*!
69  Get the program counter
70 
71  The program counter will be returned.
72 
73  \warning In case the Cpu does not implement the CpuIface the program
74  will abort. Do not use this function in performance critical code!!!
75 
76  \param Cpu The CPU object
77  \result The value of the program counter register
78  */
79 TEMU_API uint64_t temu_cpuGetPc(void *Cpu);
80 
81 /*!
82  Reset the processor.
83 
84  Resetting the CPU will result in a reset cascade where all connected
85  devices are also reset.
86 
87  \warning In case the Cpu does not implement the CpuIface the program
88  will abort. Do not use this function in performance critical code!!!
89 
90  \param Cpu The CPU object
91 
92  \param ResetType The type of reset, by convention 0 means cold
93  reset, and 1 indicates a warm reset.
94  */
95 TEMU_API void temu_cpuReset(void *Cpu, int ResetType);
96 
97 /*!
98  Run the processor for a number of cycles
99 
100  The function runs the processor for a number of cycles. If you wish
101  to run the processor with another time unit, you can compute the
102  cycles from the clock frequency of the emulated processor.
103 
104  In case the processor halts or enters idle mode and there are no
105  pending events the function will return early.
106 
107  \warning In case the Cpu does not implement the CpuIface the program
108  will abort. Do not use this function in performance critical code!!!
109 
110  \param Cpu The CPU object
111  \param Cycles The number of cycles to run the processor for.
112  \result The number of executed cycles.
113  */
114 TEMU_API uint64_t temu_cpuRun(void *Cpu, uint64_t Cycles);
115 
116 /*!
117  Run the processor for a number of steps
118 
119  This function is different from temu_cpuRun, which runs for a
120  time. The steps here indicates instructions executed (including
121  trapping instructions). This can be contrasted to the run function
122  which may advance the cycle counter by more than one for an
123  instruction (depending on the timing models).
124 
125  The function may return early in case the processor halts its
126  execution or has entered idle mode and there are no events pending.
127 
128  \warning In case the Cpu does not implement the CpuIface the program
129  will abort. Do not use this function in performance critical code!!!
130 
131  \param Cpu The CPU object
132  \param Steps The number of steps to run the processor for.
133  \result The number of executed steps.
134  */
135 TEMU_API uint64_t temu_cpuStep(void *Cpu, uint64_t Steps);
136 
137 /*!
138  Uses the MMU to translate the given virtual address Va
139  to the physical address in the emulator
140 
141  \param Cpu the CPU object
142  \param Va the virtual address to be translated
143  \param flags flags for the translation (CPU specific)
144  \param physAddressResult the result in a uint64_t pointer
145  \return error code. 0 on success, non-zero otherwise,
146  */
149 
150 /*!
151  * Gets the register in the processor
152  * \param Cpu CPU pointer
153  * \param Reg Register number
154  * \result Register value
155  */
156 TEMU_API uint64_t temu_cpuGetReg(void *Cpu, unsigned Reg);
157 
158 /*!
159  * Set the register in the processor
160  * \param Cpu CPU pointer
161  * \param Reg Register number
162  * \param Value Value to write to register
163  */
164 TEMU_API void temu_cpuSetReg(void *Cpu, unsigned Reg, uint64_t Value);
165 
166 /*!
167  * Get a 32 bit floating point register
168  * \param Cpu CPU pointer
169  * \param Reg FPU register number
170  * \result Host float with the content of the FPU register
171  */
172 TEMU_API float temu_cpuGetFpr32(void *Cpu, unsigned Reg);
173 
174 /*!
175  * Get a 32 bit floating point register
176  * \param Cpu CPU pointer
177  * \param Reg FPU register number
178  * \result Floating point register contents
179  */
180 TEMU_API uint32_t temu_cpuGetFpr32Bits(void *Cpu, unsigned Reg);
181 
182 /*!
183  * Set floating point register value
184  * \param Cpu CPU pointer
185  * \param Reg Floating point register number
186  * \param Value Floating point value to set
187  */
188 TEMU_API void temu_cpuSetFpr32(void *Cpu, unsigned Reg, float Value);
189 
190 /*!
191  * Set 32 bit floating point register value
192  * \param Cpu CPU pointer
193  * \param Reg Floating point register number
194  * \param Value Floating point value to set
195  */
196 
197 TEMU_API void temu_cpuSetFpr32Bits(void *Cpu, unsigned Reg, uint32_t Value);
198 
199 /*!
200  * Get 64 bit floating point register as double
201  * \param Cpu CPU pointer
202  * \param Reg FPU register number
203  * \result FPU register value
204  */
205 TEMU_API double temu_cpuGetFpr64(void *Cpu, unsigned Reg);
206 
207 /*!
208  * Get 64 bit floating point register contents
209  * \param Cpu CPU pointer
210  * \param Reg FPU register number
211  * \result FPU register value
212  */
213 TEMU_API uint64_t temu_cpuGetFpr64Bits(void *Cpu, unsigned Reg);
214 
215 /*!
216  * Set FPU register value
217  * \param Cpu CPU pointer
218  * \param Reg FPU register number
219  * \param Value Value to set to register
220  */
221 TEMU_API void temu_cpuSetFpr64(void *Cpu, unsigned Reg, double Value);
222 
223 /*!
224  * Set FPU register value
225  * \param Cpu CPU pointer
226  * \param Reg FPU register number
227  * \param Value Value to set to register
228  */
229 TEMU_API void temu_cpuSetFpr64Bits(void *Cpu, unsigned Reg, uint64_t Value);
230 
231 /*!
232  * Enable traps on processor
233  * \param Cpu CPU pointer
234  */
235 TEMU_API void temu_cpuEnableTraps(void *Cpu);
236 
237 /*!
238  * Disable traps on processor
239  * \param Cpu CPU pointer
240  */
241 TEMU_API void temu_cpuDisableTraps(void *Cpu);
242 
243 /*!
244  * Raise a trap
245  * The function simulates a trap being raised at the current PC.
246  *
247  * \param Cpu Processor pointer
248  * \param Trap Trap ID. This is target dependent, for the SPARC this
249  * is the TT value of the trap.
250  *
251  * \param Flags set flag 1 to enable longjmp trap (this is useful in
252  * MMIO handlers to force a trap while a core is
253  * running). Set to 0 if called from outside the core
254  * or in e.g. an event handler.
255  */
256 TEMU_API void temu_cpuRaiseTrap(void *Cpu, int Trap, unsigned Flags);
257 
258 /* Sparc specific functions */
259 
260 typedef void (*temu_SparcAsrHandler)(void *Cpu, uint32_t Instr);
261 // typedef void (*temu_SparcAsiHandler)(void *Cpu, temu_MemTransaction *MT);
262 
263 /*!
264  * Get how many register windows are supported by the CPU
265  * \param Cpu SPARC CPU pointer
266  * \result Number of register windows
267  */
269 
270 /*!
271  * Get a windowed SPARC register
272  * \param Cpu SPARC CPU pointer
273  * \param Window Window number (-1 for current window)
274  * \param Reg Register number within window
275  * \result Register value
276  */
277 TEMU_API uint32_t temu_sparcGetWindowedReg(void *Cpu, int Window, unsigned Reg);
278 
279 /*!
280  * Set a windowed SPARC register
281  * \param Cpu SPARC CPU pointer
282  * \param Window Window number (-1 for current window)
283  * \param Reg Register number within window
284  * \param Value Register value
285  */
286 TEMU_API void temu_sparcSetWindowedReg(void *Cpu, int Window, unsigned Reg,
287  uint32_t Value);
288 
289 /*!
290  * Set the Y register of the CPU,
291  * \param Cpu SPARC CPU pointer
292  * \param Value Value to write to the Y register
293  */
295 
296 /*!
297  * Get the Y register of the CPU,
298  * \param Cpu SPARC CPU pointer
299  * \result Current Y register value
300  */
301 TEMU_API uint64_t temu_sparcGetY(void *Cpu);
302 
303 /*!
304  * Set the ASR register
305  * \param Cpu SPARC CPU pointer
306  * \param Reg ASR register ID
307  * \param Value Value to write
308  */
309 TEMU_API void temu_sparcSetAsr(void *Cpu, unsigned Reg, uint64_t Value);
310 
311 /*!
312  * Get ASR register value
313  * \param Cpu SPARC CPU pointer
314  * \param Reg ASR register ID
315  * \result ASR register value
316  */
317 TEMU_API uint64_t temu_sparcGetAsr(void *Cpu, unsigned Reg);
318 
319 /*!
320  * Install the handler to be called when an ASR is written
321  * \param Cpu SPARC CPU pointer
322  * \param Asr ASR register ID
323  * \param Handler Function to call.
324  */
325 TEMU_API void temu_sparcSetAsrWriter(void *Cpu, unsigned Asr,
327 
328 /*!
329  * Install the handler to be called when an ASR is read
330  * \param Cpu SPARC CPU pointer
331  * \param Asr ASR register ID
332  * \param Handler Function to call.
333  */
334 TEMU_API void temu_sparcSetAsrReader(void *Cpu, unsigned Asr,
336 
337 /*!
338  * Set the Processor State Register
339  * \param Cpu SPARC CPU pointer
340  * \param Value Value to write
341  */
343 
344 /*!
345  * Get the Processor State Register
346  * \param Cpu SPARC CPU pointer
347  * \result PSR value
348  */
349 TEMU_API uint32_t temu_sparcGetPsr(void *Cpu);
350 
351 /*!
352  * Set the Trap Base Register
353  * \param Cpu SPARC CPU pointer,
354  * \param Value Value for TBR register
355  */
357 
358 /*!
359  * Get Trap Base Register value
360  * \param Cpu SPARC CPU pointer
361  * \result TBR value
362  */
363 TEMU_API uint32_t temu_sparcGetTbr(void *Cpu);
364 
365 /*!
366  * Set window invalidation mask register
367  * \param Cpu SPARC CPU pointer
368  * \param Value value to set in WIM
369  */
371 
372 /*!
373  * Get window invalidation mask register
374  * \param Cpu SPARC CPU pointer
375  * \result WIM value
376  */
377 TEMU_API uint32_t temu_sparcGetWim(void *Cpu);
378 
379 /*!
380  * Set the nPC value (next program counter)
381  *
382  * NOTE: When you use the setPC function, the NPC is also
383  * updated to PC+4. Use this to explicitly set NPC.
384  *
385  * \param Cpu SPARC CPU pointer
386  * \param Value Value to write to NPC
387  */
389 
390 /*!
391  * Get the nPC value
392  * \param Cpu SPARC CPU pointer
393  * \result nPC value
394  */
395 TEMU_API uint32_t temu_sparcGetNPc(void *Cpu);
396 
397 
398 /*!
399  * Set the ARM processor state register
400  * \param Cpu ARM CPU pointer
401  * \param Value Value to set the APSR to
402  */
404 /*!
405  * Get the ARM processor state register
406  * \param Cpu ARM CPU pointer
407  * \result APSR value
408  */
409 TEMU_API uint32_t temu_armGetAPSR(void *Cpu);
410 /*!
411  * Set the ARM FPSCR register
412  * \param Cpu ARM CPU pointer
413  * \param Value FPSCR value
414  */
416 /*!
417  * Get the ARM FPSCR register
418  * \param Cpu ARM CPU pointer
419  * \result FPSCR value
420  */
421 TEMU_API uint32_t temu_armGetFPSCR(void *Cpu);
422 
423 /*!
424  * Set the ARM FPEXC register
425  * \param Cpu ARM CPU pointer
426  * \param Value FPEXC value
427  */
429 /*!
430  * Get the ARM FPEXC register
431  * \param Cpu ARM CPU pointer
432  * \result FPEXC value
433  */
434 TEMU_API uint32_t temu_armGetFPEXC(void *Cpu);
435 
436 /*!
437  * Set the ARM FPINST register
438  * \param Cpu ARM CPU pointer
439  * \param Idx FPINST register number
440  * \param Value FPINST value
441  */
442 
443 TEMU_API void temu_armSetFPINST(void *Cpu, int Idx, uint32_t Value);
444 /*!
445  * Get the ARM FPINST register
446  * \param Cpu ARM CPU pointer
447  * \param Idx FPINST register number
448  * \result FPINST value
449  */
450 TEMU_API uint32_t temu_armGetFPINST(void *Cpu, int Idx);
451 
452 /*!
453  * Get the ARM execution mode
454  * \param Cpu ARM CPU pointer
455  * \result Execution mode
456  */
457 TEMU_API unsigned temu_armGetExecMode(void *Cpu);
458 /*!
459  * Set the ARM execution mode
460  * \param Cpu ARM CPU pointer
461  * \param Mode Execution mode
462  */
463 TEMU_API void temu_armSetExecMode(void *Cpu, unsigned Mode);
464 
465 /*!
466  * Set the PowerPC CR register
467  * \param Cpu Processor pointer
468  * \param Value New CR value
469  */
471 /*!
472  * Get the PowerPC CR register
473  * \param Cpu Processor pointer
474  * \result CR value
475  */
476 TEMU_API uint32_t temu_ppcGetCrReg(void *Cpu);
477 /*!
478  * Set the PowerPC XER register
479  * \param Cpu Processor pointer
480  * \param Value New XER value
481  */
483 /*!
484  * Get the PowerPC XER register
485  * \param Cpu Processor pointer
486  * \result XER value
487  */
488 TEMU_API uint32_t temu_ppcGetXerReg(void *Cpu);
489 
490 /*!
491  * Set the PowerPC MSR register
492  * \param Cpu Processor pointer
493  * \param Value New MSR value
494  */
496 /*!
497  * Get the PowerPC MSR register
498  * \param Cpu Processor pointer
499  * \result MSR value
500  */
501 TEMU_API uint64_t temu_ppcGetMsrReg(void *Cpu);
502 /*!
503  * Set the PowerPC reserve address used by `lwarx` and `stwcx`
504  * \param Cpu Processor pointer
505  * \param reserveAddress New reserved address value
506  */
508 /*!
509  * Get the PowerPC reserve address used by `lwarx` and `stwcx`
510  * \param Cpu Processor pointer
511  * \result The reserved address value
512  */
513 TEMU_API uint64_t temu_ppcGetReserveAddress(void *Cpu);
514 /*!
515  * Clear the PowerPC reserve address used by `lwarx` and `stwcx`
516  * \param Cpu Processor pointer
517  */
519 /*!
520  * Check if PowerPC reserve address is set `lwarx` and `stwcx`
521  * \param Cpu Processor pointer
522  * \result 1 if reservation is set, 0 if cleared.
523  */
525 /*!
526  * Set the PowerPC CTR register
527  * \param Cpu Processor pointer
528  * \param Value New CTR value
529  */
531 /*!
532  * Get the PowerPC CTR register
533  * \param Cpu Processor pointer
534  * \result The CTR value
535  */
536 TEMU_API uint32_t temu_ppcGetCtrReg(void *Cpu);
537 /*!
538  * Set the PowerPC FPSCR register
539  * \param Cpu Processor pointer
540  * \param Value New FPSCR value
541  */
543 /*!
544  * Get the PowerPC FPSCR register
545  * \param Cpu Processor pointer
546  * \result The FPSCR value
547  */
548 TEMU_API uint32_t temu_ppcGetFpscrReg(void *Cpu);
549 /*!
550  * Set the PowerPC LR register
551  * \param Cpu Processor pointer
552  * \param Value New LR value
553  */
555 /*!
556  * Get the PowerPC LR register
557  * \param Cpu Processor pointer
558  * \result The LR value
559  */
560 TEMU_API uint64_t temu_ppcGetLrReg(void *Cpu);
561 /*!
562  * Set the PowerPC SPR register
563  * \param Cpu Processor pointer
564  * \param RegId SPR register number
565  * \param Value New SPR value
566  */
567 TEMU_API void temu_cpuSetSpr(void *Cpu, unsigned RegId, uint64_t Value);
568 /*!
569  * Get the PowerPC SPR register
570  * \param Cpu Processor pointer
571  * \param RegId SPR register number
572  * \result Value of SPR specified in `RegId`.
573  */
574 TEMU_API uint64_t temu_cpuGetSpr(void *Cpu, unsigned RegId);
575 
576 // Machine functions
577 
578 /*!
579  Get the Machine for a given CPU
580  \param Cpu Pointer to the CPU object
581  \result Pointer to the machine object
582  */
583 TEMU_API void *temu_cpuGetMachine(void *Cpu);
584 
585 /*!
586  Reset the Machine
587 
588  Resetting the Machine will result in a reset cascade where all connected
589  devices and processors are also reset.
590 
591  \warning In case the Machine does not implement the MachineIface the
592  program will abort. Do not use this function in performance critical
593  code!!!
594 
595  \param Machine The Machine object
596 
597  \param ResetType The type of reset, by convention 0 means cold
598  reset, and 1 indicates a warm reset.
599  */
601 
602 /*!
603  Run the machine for a number of nanoseconds
604 
605  The function runs the machine and for a number of nanoseconds. This
606  will run all the CPUs in the system.
607 
608  In case a processor halts or enters idle mode, the function returns
609  early.
610 
611  \warning In case the machine does not implement the MachineIface the
612  program will abort. Do not use this function in performance critical
613  code!!!
614 
615  \param Machine The machine object
616  \param NanoSecs The number of nanosecs to run each processor for.
617  \result The number of executed nanoseconds.
618  */
619 TEMU_API uint64_t temu_machineRun(void *Machine, uint64_t NanoSecs);
620 
621 typedef void (*temu_SafeCb)(void *);
622 
623 /*!
624  Post a callback in a time source
625 
626  The posting will be thread-safe and the callback will be excuted by
627  the main thread (the one calling the cpu or machine run / step
628  functions). The main thread is the thread calling cpu run if there
629  is only a single cpu in the system, and the thread calling machine
630  run if there are multiple CPUs in the system.
631 
632  The callback will be executed as soon as possible, when the even
633  queue is checked for events. Which in practice mean:
634 
635  - At the end of the current time quanta for multi-cpu systems.
636 
637  - At regular intervals for single CPU systems (a CPU runs a
638  null-event periodically. Note that the callback will be
639  called as soon as either a normal or the null event is executed.
640 
641  The posting of this callback is thread-safe but not async / signal
642  safe. I.e. do not do this from signal handler or async io callbacks.
643 
644  When the event is executed, it is safe to do most emulator
645  operations, including posting of events, calling API functions, etc.
646 
647  The callback must however not:
648 
649  - Manipulate the object system meta state (i.e. creating or
650  modifying classes)
651 
652  - Replace signal handlers (e.g. SIGINT)
653 
654  - Run or step the emulator in any way (e.g. by calling machineRun(),
655  cpuRun() or using the CpuIface or MachineIface interfaces.
656 
657  \param Obj Time source
658  \param Cb Callback
659  \param Arg Argument passed to callback
660  */
661 TEMU_API void temu_postCallback(void *Obj, temu_SafeCb Cb, void *Arg);
662 
663 /*!
664  * Get processor statistics
665  *
666  * \param Obj Processor pointer
667  * \param Stat Statistics ID
668  * \result Statistics value
669  */
670 TEMU_API uint64_t temu_cpuGetStat(void *Obj, int Stat);
671 /*!
672  * Clear processor statistics
673  *
674  * \param Obj Processor pointer
675  * \param Stat Statistics ID
676  */
677 TEMU_API void temu_cpuResetStat(void *Obj, int Stat);
678 
679 #ifdef __cplusplus
680 }
681 #endif
682 
683 #endif /* ! TEMU_SUPPORT_CPU */
temu_postCallback
TEMU_API void temu_postCallback(void *Obj, temu_SafeCb Cb, void *Arg)
temu_sparcSetAsrReader
TEMU_API void temu_sparcSetAsrReader(void *Cpu, unsigned Asr, temu_SparcAsrHandler Handler)
temu_SparcAsrHandler
void(* temu_SparcAsrHandler)(void *Cpu, uint32_t Instr)
Definition: Cpu.h:260
temu_armSetFPEXC
TEMU_API void temu_armSetFPEXC(void *Cpu, uint32_t Value)
temu_cpuTranslateAddress
TEMU_API int temu_cpuTranslateAddress(void *Cpu, uint64_t Va, uint32_t flags, uint64_t *physAddressResult)
temu_cpuDisableTraps
TEMU_API void temu_cpuDisableTraps(void *Cpu)
temu_cpuReset
TEMU_API void temu_cpuReset(void *Cpu, int ResetType)
temu_sparcGetWindowCount
TEMU_API int temu_sparcGetWindowCount(void *Cpu)
temu_cpuGetFpr64
TEMU_API double temu_cpuGetFpr64(void *Cpu, unsigned Reg)
temu_ppcSetCrReg
TEMU_API void temu_ppcSetCrReg(void *Cpu, uint32_t Value)
temu_ppcSetCtrReg
TEMU_API void temu_ppcSetCtrReg(void *Cpu, uint32_t Value)
temu_ppcSetMsrReg
TEMU_API void temu_ppcSetMsrReg(void *Cpu, uint64_t Value)
temu_cpuResetStat
TEMU_API void temu_cpuResetStat(void *Obj, int Stat)
temu_sparcSetY
TEMU_API void temu_sparcSetY(void *Cpu, uint64_t Value)
temu_cpuSetFpr32
TEMU_API void temu_cpuSetFpr32(void *Cpu, unsigned Reg, float Value)
temu_sparcSetWindowedReg
TEMU_API void temu_sparcSetWindowedReg(void *Cpu, int Window, unsigned Reg, uint32_t Value)
temu_ppcClearAddressReservation
TEMU_API void temu_ppcClearAddressReservation(void *Cpu)
temu_cpuSetPc
TEMU_API void temu_cpuSetPc(void *Cpu, uint64_t Pc)
temu_sparcSetAsrWriter
TEMU_API void temu_sparcSetAsrWriter(void *Cpu, unsigned Asr, temu_SparcAsrHandler Handler)
temu_ppcSetReserveAddress
TEMU_API void temu_ppcSetReserveAddress(void *Cpu, uint64_t reserveAddress)
temu_sparcSetTbr
TEMU_API void temu_sparcSetTbr(void *Cpu, uint32_t Value)
temu_sparcSetWim
TEMU_API void temu_sparcSetWim(void *Cpu, uint32_t Value)
temu_ppcSetFpscrReg
TEMU_API void temu_ppcSetFpscrReg(void *Cpu, uint32_t Value)
temu_cpuSetSpr
TEMU_API void temu_cpuSetSpr(void *Cpu, unsigned RegId, uint64_t Value)
temu_armSetAPSR
TEMU_API void temu_armSetAPSR(void *Cpu, uint32_t Value)
temu_armSetFPSCR
TEMU_API void temu_armSetFPSCR(void *Cpu, uint32_t Value)
temu_cpuRaiseTrap
TEMU_API void temu_cpuRaiseTrap(void *Cpu, int Trap, unsigned Flags)
temu_cpuGetFpr32
TEMU_API float temu_cpuGetFpr32(void *Cpu, unsigned Reg)
temu_cpuEnableTraps
TEMU_API void temu_cpuEnableTraps(void *Cpu)
temu_armSetFPINST
TEMU_API void temu_armSetFPINST(void *Cpu, int Idx, uint32_t Value)
temu_sparcSetNPc
TEMU_API void temu_sparcSetNPc(void *Cpu, uint32_t Value)
temu_sparcSetAsr
TEMU_API void temu_sparcSetAsr(void *Cpu, unsigned Reg, uint64_t Value)
temu_ppcIsReservationBitSet
TEMU_API int temu_ppcIsReservationBitSet(void *Cpu)
temu_cpuGetMachine
TEMU_API void * temu_cpuGetMachine(void *Cpu)
temu_cpuSetFpr64
TEMU_API void temu_cpuSetFpr64(void *Cpu, unsigned Reg, double Value)
temu_sparcSetPsr
TEMU_API void temu_sparcSetPsr(void *Cpu, uint32_t Value)
temu_armSetExecMode
TEMU_API void temu_armSetExecMode(void *Cpu, unsigned Mode)
temu_SafeCb
void(* temu_SafeCb)(void *)
Definition: Cpu.h:621
temu_cpuSetFpr64Bits
TEMU_API void temu_cpuSetFpr64Bits(void *Cpu, unsigned Reg, uint64_t Value)
temu_ppcSetLrReg
TEMU_API void temu_ppcSetLrReg(void *Cpu, uint64_t Value)
temu_machineReset
TEMU_API void temu_machineReset(void *Machine, int ResetType)
temu_armGetExecMode
TEMU_API unsigned temu_armGetExecMode(void *Cpu)
temu_cpuSetFpr32Bits
TEMU_API void temu_cpuSetFpr32Bits(void *Cpu, unsigned Reg, uint32_t Value)
temu_ppcSetXerReg
TEMU_API void temu_ppcSetXerReg(void *Cpu, uint32_t Value)
temu_cpuSetReg
TEMU_API void temu_cpuSetReg(void *Cpu, unsigned Reg, uint64_t Value)