TEMU  3.0
The Terma Emulator
BinaryTranslation.h
Go to the documentation of this file.
1 //===--------------------------------------------------------------*- C -*-===//
2 //
3 // TEMU: The Terma Emulator
4 // (c) Terma 2018, 2019, 2022
5 // Authors: Mattias Holm <maho (at) terma.com>
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef TEMU_BINARY_TRANSLATOR_H
10 #define TEMU_BINARY_TRANSLATOR_H
11 #include "temu-c/Support/Objsys.h"
12 #include <stdint.h>
13 // NOTE: Internal API, do not use directly
14 
18 typedef enum {
25 
29 typedef struct {
31  int (*translate)(void *Obj, uint64_t PA, unsigned NumInstrs);
33  int (*translateBlock)(void *Obj, uint64_t PA);
34 
36  int (*chainBlocks)(void *Obj, uint64_t SourceBlockPA, uint64_t TargetBlockPA, int Arm);
37 
39  int (*clearBlock)(void *Obj, uint64_t PA);
41  int (*clearBlocksOnPage)(void *Obj, uint64_t PA);
43  void (*enableStatistics)(void *Obj, temu_BTStatID ID);
45  void (*disableStatistics)(void *Obj, temu_BTStatID ID);
47  uint64_t (*getStatistics)(void *Obj, temu_BTStatID ID);
49  void (*clearStatistics)(void *Obj, temu_BTStatID ID);
51  const char* (*disassemble)(void *Obj, uint64_t Addr);
52 } temu_BTIface;
53 #define TEMU_BT_IFACE_TYPE "BTIface"
55 
56 #endif // ! TEMU_BINARY_TRANSLATOR_H
Number of translated instructions.
Definition: BinaryTranslation.h:19
Definition: BinaryTranslation.h:29
Number of translated blocks.
Definition: BinaryTranslation.h:21
Translated code size in bytes.
Definition: BinaryTranslation.h:23
Number of executed blocks.
Definition: BinaryTranslation.h:22
temu_BTStatID
Definition: BinaryTranslation.h:18
TEMU_IFACE_REFERENCE_TYPE(temu_BT)
Number of executed instructions.
Definition: BinaryTranslation.h:20