TEMU  4.4
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 
152 /*!
153  Uses the an explicit page table pointer to translate a virtual address
154  to physical address.
155 
156  The routine is dependent on the processor having hardware managed page tables.
157  Hence this works e.g. for SPARC and ARM processors, but not for PowerPC.
158 
159  \param cpu the CPU object
160  \param va the virtual address to be translated
161  \param flags flags for the translation (CPU specific)
162  \param physAddressResult the result in a uint64_t pointer
163  \param pageTableRoot The page table to use for the translation
164  \return error code. 0 on success, non-zero otherwise,
165  */
166 TEMU_API int
170 
171 /*!
172  * Gets the register in the processor
173  * \param Cpu CPU pointer
174  * \param Reg Register number
175  * \result Register value
176  */
177 TEMU_API uint64_t temu_cpuGetReg(void *Cpu, unsigned Reg);
178 
179 /*!
180  * Set the register in the processor
181  * \param Cpu CPU pointer
182  * \param Reg Register number
183  * \param Value Value to write to register
184  */
185 TEMU_API void temu_cpuSetReg(void *Cpu, unsigned Reg, uint64_t Value);
186 
187 /*!
188  * Get a 32 bit floating point register
189  * \param Cpu CPU pointer
190  * \param Reg FPU register number
191  * \result Host float with the content of the FPU register
192  */
193 TEMU_API float temu_cpuGetFpr32(void *Cpu, unsigned Reg);
194 
195 /*!
196  * Get a 32 bit floating point register
197  * \param Cpu CPU pointer
198  * \param Reg FPU register number
199  * \result Floating point register contents
200  */
201 TEMU_API uint32_t temu_cpuGetFpr32Bits(void *Cpu, unsigned Reg);
202 
203 /*!
204  * Set floating point register value
205  * \param Cpu CPU pointer
206  * \param Reg Floating point register number
207  * \param Value Floating point value to set
208  */
209 TEMU_API void temu_cpuSetFpr32(void *Cpu, unsigned Reg, float Value);
210 
211 /*!
212  * Set 32 bit floating point register value
213  * \param Cpu CPU pointer
214  * \param Reg Floating point register number
215  * \param Value Floating point value to set
216  */
217 
218 TEMU_API void temu_cpuSetFpr32Bits(void *Cpu, unsigned Reg, uint32_t Value);
219 
220 /*!
221  * Get 64 bit floating point register as double
222  * \param Cpu CPU pointer
223  * \param Reg FPU register number
224  * \result FPU register value
225  */
226 TEMU_API double temu_cpuGetFpr64(void *Cpu, unsigned Reg);
227 
228 /*!
229  * Get 64 bit floating point register contents
230  * \param Cpu CPU pointer
231  * \param Reg FPU register number
232  * \result FPU register value
233  */
234 TEMU_API uint64_t temu_cpuGetFpr64Bits(void *Cpu, unsigned Reg);
235 
236 /*!
237  * Set FPU register value
238  * \param Cpu CPU pointer
239  * \param Reg FPU register number
240  * \param Value Value to set to register
241  */
242 TEMU_API void temu_cpuSetFpr64(void *Cpu, unsigned Reg, double Value);
243 
244 /*!
245  * Set FPU register value
246  * \param Cpu CPU pointer
247  * \param Reg FPU register number
248  * \param Value Value to set to register
249  */
250 TEMU_API void temu_cpuSetFpr64Bits(void *Cpu, unsigned Reg, uint64_t Value);
251 
252 /*!
253  * Enable traps on processor
254  * \param Cpu CPU pointer
255  */
256 TEMU_API void temu_cpuEnableTraps(void *Cpu);
257 
258 /*!
259  * Disable traps on processor
260  * \param Cpu CPU pointer
261  */
262 TEMU_API void temu_cpuDisableTraps(void *Cpu);
263 
264 /*!
265  * Raise a trap
266  * The function simulates a trap being raised at the current PC.
267  *
268  * \param Cpu Processor pointer
269  * \param Trap Trap ID. This is target dependent, for the SPARC this
270  * is the TT value of the trap.
271  *
272  * \param Flags set flag 1 to enable longjmp trap (this is useful in
273  * MMIO handlers to force a trap while a core is
274  * running). Set to 0 if called from outside the core
275  * or in e.g. an event handler.
276  */
277 TEMU_API void temu_cpuRaiseTrap(void *Cpu, int Trap, unsigned Flags);
278 
279 /* Sparc specific functions */
280 
281 typedef void (*temu_SparcAsrHandler)(void *Cpu, uint32_t Instr);
282 // typedef void (*temu_SparcAsiHandler)(void *Cpu, temu_MemTransaction *MT);
283 
284 /*!
285  * Get how many register windows are supported by the CPU
286  * \param Cpu SPARC CPU pointer
287  * \result Number of register windows
288  */
290 
291 /*!
292  * Get a windowed SPARC register
293  * \param Cpu SPARC CPU pointer
294  * \param Window Window number (-1 for current window)
295  * \param Reg Register number within window
296  * \result Register value
297  */
298 TEMU_API uint32_t temu_sparcGetWindowedReg(void *Cpu, int Window, unsigned Reg);
299 
300 /*!
301  * Set a windowed SPARC register
302  * \param Cpu SPARC CPU pointer
303  * \param Window Window number (-1 for current window)
304  * \param Reg Register number within window
305  * \param Value Register value
306  */
307 TEMU_API void temu_sparcSetWindowedReg(void *Cpu, int Window, unsigned Reg,
308  uint32_t Value);
309 
310 /*!
311  * Set the Y register of the CPU,
312  * \param Cpu SPARC CPU pointer
313  * \param Value Value to write to the Y register
314  */
316 
317 /*!
318  * Get the Y register of the CPU,
319  * \param Cpu SPARC CPU pointer
320  * \result Current Y register value
321  */
322 TEMU_API uint64_t temu_sparcGetY(void *Cpu);
323 
324 /*!
325  * Set the ASR register
326  * \param Cpu SPARC CPU pointer
327  * \param Reg ASR register ID
328  * \param Value Value to write
329  */
330 TEMU_API void temu_sparcSetAsr(void *Cpu, unsigned Reg, uint64_t Value);
331 
332 /*!
333  * Get ASR register value
334  * \param Cpu SPARC CPU pointer
335  * \param Reg ASR register ID
336  * \result ASR register value
337  */
338 TEMU_API uint64_t temu_sparcGetAsr(void *Cpu, unsigned Reg);
339 
340 /*!
341  * Install the handler to be called when an ASR is written
342  * \param Cpu SPARC CPU pointer
343  * \param Asr ASR register ID
344  * \param Handler Function to call.
345  */
346 TEMU_API void temu_sparcSetAsrWriter(void *Cpu, unsigned Asr,
348 
349 /*!
350  * Install the handler to be called when an ASR is read
351  * \param Cpu SPARC CPU pointer
352  * \param Asr ASR register ID
353  * \param Handler Function to call.
354  */
355 TEMU_API void temu_sparcSetAsrReader(void *Cpu, unsigned Asr,
357 
358 /*!
359  * Set the Processor State Register
360  * \param Cpu SPARC CPU pointer
361  * \param Value Value to write
362  */
364 
365 /*!
366  * Get the Processor State Register
367  * \param Cpu SPARC CPU pointer
368  * \result PSR value
369  */
370 TEMU_API uint32_t temu_sparcGetPsr(void *Cpu);
371 
372 /*!
373  * Set the Trap Base Register
374  * \param Cpu SPARC CPU pointer,
375  * \param Value Value for TBR register
376  */
378 
379 /*!
380  * Get Trap Base Register value
381  * \param Cpu SPARC CPU pointer
382  * \result TBR value
383  */
384 TEMU_API uint32_t temu_sparcGetTbr(void *Cpu);
385 
386 /*!
387  * Set window invalidation mask register
388  * \param Cpu SPARC CPU pointer
389  * \param Value value to set in WIM
390  */
392 
393 /*!
394  * Get window invalidation mask register
395  * \param Cpu SPARC CPU pointer
396  * \result WIM value
397  */
398 TEMU_API uint32_t temu_sparcGetWim(void *Cpu);
399 
400 /*!
401  * Set the nPC value (next program counter)
402  *
403  * NOTE: When you use the setPC function, the NPC is also
404  * updated to PC+4. Use this to explicitly set NPC.
405  *
406  * \param Cpu SPARC CPU pointer
407  * \param Value Value to write to NPC
408  */
410 
411 /*!
412  * Get the nPC value
413  * \param Cpu SPARC CPU pointer
414  * \result nPC value
415  */
416 TEMU_API uint32_t temu_sparcGetNPc(void *Cpu);
417 
418 
419 /*!
420  * Set the ARM processor state register
421  * \param Cpu ARM CPU pointer
422  * \param Value Value to set the APSR to
423  */
425 /*!
426  * Get the ARM processor state register
427  * \param Cpu ARM CPU pointer
428  * \result APSR value
429  */
430 TEMU_API uint32_t temu_armGetAPSR(void *Cpu);
431 /*!
432  * Set the ARM FPSCR register
433  * \param Cpu ARM CPU pointer
434  * \param Value FPSCR value
435  */
437 /*!
438  * Get the ARM FPSCR register
439  * \param Cpu ARM CPU pointer
440  * \result FPSCR value
441  */
442 TEMU_API uint32_t temu_armGetFPSCR(void *Cpu);
443 
444 /*!
445  * Set the ARM FPEXC register
446  * \param Cpu ARM CPU pointer
447  * \param Value FPEXC value
448  */
450 /*!
451  * Get the ARM FPEXC register
452  * \param Cpu ARM CPU pointer
453  * \result FPEXC value
454  */
455 TEMU_API uint32_t temu_armGetFPEXC(void *Cpu);
456 
457 /*!
458  * Set the ARM FPINST register
459  * \param Cpu ARM CPU pointer
460  * \param Idx FPINST register number
461  * \param Value FPINST value
462  */
463 
464 TEMU_API void temu_armSetFPINST(void *Cpu, int Idx, uint32_t Value);
465 /*!
466  * Get the ARM FPINST register
467  * \param Cpu ARM CPU pointer
468  * \param Idx FPINST register number
469  * \result FPINST value
470  */
471 TEMU_API uint32_t temu_armGetFPINST(void *Cpu, int Idx);
472 
473 /*!
474  * Get the ARM execution mode
475  * \param Cpu ARM CPU pointer
476  * \result Execution mode
477  */
478 TEMU_API unsigned temu_armGetExecMode(void *Cpu);
479 /*!
480  * Set the ARM execution mode
481  * \param Cpu ARM CPU pointer
482  * \param Mode Execution mode
483  */
484 TEMU_API void temu_armSetExecMode(void *Cpu, unsigned Mode);
485 
486 /*!
487  * Set the PowerPC CR register
488  * \param Cpu Processor pointer
489  * \param Value New CR value
490  */
492 /*!
493  * Get the PowerPC CR register
494  * \param Cpu Processor pointer
495  * \result CR value
496  */
497 TEMU_API uint32_t temu_ppcGetCrReg(void *Cpu);
498 /*!
499  * Set the PowerPC XER register
500  * \param Cpu Processor pointer
501  * \param Value New XER value
502  */
504 /*!
505  * Get the PowerPC XER register
506  * \param Cpu Processor pointer
507  * \result XER value
508  */
509 TEMU_API uint32_t temu_ppcGetXerReg(void *Cpu);
510 
511 /*!
512  * Set the PowerPC MSR register
513  * \param Cpu Processor pointer
514  * \param Value New MSR value
515  */
517 /*!
518  * Get the PowerPC MSR register
519  * \param Cpu Processor pointer
520  * \result MSR value
521  */
522 TEMU_API uint64_t temu_ppcGetMsrReg(void *Cpu);
523 /*!
524  * Set the PowerPC reserve address used by `lwarx` and `stwcx`
525  * \param Cpu Processor pointer
526  * \param reserveAddress New reserved address value
527  */
529 /*!
530  * Get the PowerPC reserve address used by `lwarx` and `stwcx`
531  * \param Cpu Processor pointer
532  * \result The reserved address value
533  */
534 TEMU_API uint64_t temu_ppcGetReserveAddress(void *Cpu);
535 /*!
536  * Clear the PowerPC reserve address used by `lwarx` and `stwcx`
537  * \param Cpu Processor pointer
538  */
540 /*!
541  * Check if PowerPC reserve address is set `lwarx` and `stwcx`
542  * \param Cpu Processor pointer
543  * \result 1 if reservation is set, 0 if cleared.
544  */
546 /*!
547  * Set the PowerPC CTR register
548  * \param Cpu Processor pointer
549  * \param Value New CTR value
550  */
552 /*!
553  * Get the PowerPC CTR register
554  * \param Cpu Processor pointer
555  * \result The CTR value
556  */
557 TEMU_API uint32_t temu_ppcGetCtrReg(void *Cpu);
558 /*!
559  * Set the PowerPC FPSCR register
560  * \param Cpu Processor pointer
561  * \param Value New FPSCR value
562  */
564 /*!
565  * Get the PowerPC FPSCR register
566  * \param Cpu Processor pointer
567  * \result The FPSCR value
568  */
569 TEMU_API uint32_t temu_ppcGetFpscrReg(void *Cpu);
570 /*!
571  * Set the PowerPC LR register
572  * \param Cpu Processor pointer
573  * \param Value New LR value
574  */
576 /*!
577  * Get the PowerPC LR register
578  * \param Cpu Processor pointer
579  * \result The LR value
580  */
581 TEMU_API uint64_t temu_ppcGetLrReg(void *Cpu);
582 /*!
583  * Set the PowerPC SPR register
584  * \param Cpu Processor pointer
585  * \param RegId SPR register number
586  * \param Value New SPR value
587  */
588 TEMU_API void temu_cpuSetSpr(void *Cpu, unsigned RegId, uint64_t Value);
589 /*!
590  * Get the PowerPC SPR register
591  * \param Cpu Processor pointer
592  * \param RegId SPR register number
593  * \result Value of SPR specified in `RegId`.
594  */
595 TEMU_API uint64_t temu_cpuGetSpr(void *Cpu, unsigned RegId);
596 
597 // Machine functions
598 
599 /*!
600  Get the Machine for a given CPU
601  \param Cpu Pointer to the CPU object
602  \result Pointer to the machine object
603  */
604 TEMU_API void *temu_cpuGetMachine(void *Cpu);
605 
606 /*!
607  Reset the Machine
608 
609  Resetting the Machine will result in a reset cascade where all connected
610  devices and processors are also reset.
611 
612  \warning In case the Machine does not implement the MachineIface the
613  program will abort. Do not use this function in performance critical
614  code!!!
615 
616  \param Machine The Machine object
617 
618  \param ResetType The type of reset, by convention 0 means cold
619  reset, and 1 indicates a warm reset.
620  */
622 
623 /*!
624  Run the machine for a number of nanoseconds
625 
626  The function runs the machine and for a number of nanoseconds. This
627  will run all the CPUs in the system.
628 
629  In case a processor halts or enters idle mode, the function returns
630  early.
631 
632  \warning In case the machine does not implement the MachineIface the
633  program will abort. Do not use this function in performance critical
634  code!!!
635 
636  \param Machine The machine object
637  \param NanoSecs The number of nanosecs to run each processor for.
638  \result The number of executed nanoseconds.
639  */
640 TEMU_API uint64_t temu_machineRun(void *Machine, uint64_t NanoSecs);
641 
642 typedef void (*temu_SafeCb)(void *);
643 
644 /*!
645  Post a callback in a time source
646 
647  The posting will be thread-safe and the callback will be excuted by
648  the main thread (the one calling the cpu or machine run / step
649  functions). The main thread is the thread calling cpu run if there
650  is only a single cpu in the system, and the thread calling machine
651  run if there are multiple CPUs in the system.
652 
653  The callback will be executed as soon as possible, when the even
654  queue is checked for events. Which in practice mean:
655 
656  - At the end of the current time quanta for multi-cpu systems.
657 
658  - At regular intervals for single CPU systems (a CPU runs a
659  null-event periodically. Note that the callback will be
660  called as soon as either a normal or the null event is executed.
661 
662  The posting of this callback is thread-safe but not async / signal
663  safe. I.e. do not do this from signal handler or async io callbacks.
664 
665  When the event is executed, it is safe to do most emulator
666  operations, including posting of events, calling API functions, etc.
667 
668  The callback must however not:
669 
670  - Manipulate the object system meta state (i.e. creating or
671  modifying classes)
672 
673  - Replace signal handlers (e.g. SIGINT)
674 
675  - Run or step the emulator in any way (e.g. by calling machineRun(),
676  cpuRun() or using the CpuIface or MachineIface interfaces.
677 
678  \param Obj Time source
679  \param Cb Callback
680  \param Arg Argument passed to callback
681  */
682 TEMU_API void temu_postCallback(void *Obj, temu_SafeCb Cb, void *Arg);
683 
684 /*!
685  * Get processor statistics
686  *
687  * \param Obj Processor pointer
688  * \param Stat Statistics ID
689  * \result Statistics value
690  */
691 TEMU_API uint64_t temu_cpuGetStat(void *Obj, int Stat);
692 /*!
693  * Clear processor statistics
694  *
695  * \param Obj Processor pointer
696  * \param Stat Statistics ID
697  */
698 TEMU_API void temu_cpuResetStat(void *Obj, int Stat);
699 
700 #ifdef __cplusplus
701 }
702 #endif
703 
704 #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:281
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_cpuTranslateAddressWithRootPointer
TEMU_API int temu_cpuTranslateAddressWithRootPointer(void *cpu, uint64_t va, uint32_t flags, uint64_t *physAddressResult, uint64_t pageTableRoot)
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:642
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)