TEMU  3.0
The Terma Emulator
Instrumenter.h
Go to the documentation of this file.
1 //===--------------------------------------------------------------*- C -*-===//
2 //
3 // TEMU: The Terma Emulator
4 // (c) Terma 2018, 2019
5 // Authors: Mattias Holm <maho (at) terma.com>
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef TEMU_INSTRUMENTER_H
10 #define TEMU_INSTRUMENTER_H
11 #include "temu-c/Support/Objsys.h"
12 #include <stdint.h>
13 
17 typedef enum {
18  teIF_Branch = 1 << 0,
20  teIF_Load = 1 << 2,
21  teIF_Store = 1 << 3,
22  teIF_Integer = 1 << 4,
23  teIF_Float = 1 << 5,
24  teIF_Arithmetic = 1 << 6,
25  teIF_Annulled = 1 << 7,
28  teIF_OnPage = 1 << 10,
29  teIF_ModeSwitch = 1 << 11,
30  teIF_Call = 1 << 12,
32 
36 typedef struct {
38  int (*beginBlock)(void *Obj, uint64_t VA, uint64_t PA);
40  int (*endBlock)(void *Obj, uint64_t VA, uint64_t PA);
42  int (*beginInstr)(void *Obj, uint64_t VA, uint64_t PA, uint32_t Instr,
43  uint32_t Flags);
44 
48  int (*endInstr)(void *Obj, uint64_t VA, uint64_t PA, uint32_t Instr,
49  uint32_t Flags, int Arm);
51 
52 #define TEMU_INSTRUMENTER_IFACE_TYPE "temu::InstrumenterIface"
53 TEMU_IFACE_REFERENCE_TYPE(temu_Instrumenter);
54 
55 #endif // ! TEMU_INSTRUMENTER_H
On page branch.
Definition: Instrumenter.h:28
Unconditional not-taken branch.
Definition: Instrumenter.h:27
Privilege mode switching instruction.
Definition: Instrumenter.h:29
Call instruction.
Definition: Instrumenter.h:30
temu_InstructionFlags
Definition: Instrumenter.h:17
Instruction is an indirect branch.
Definition: Instrumenter.h:19
Instruction is a load.
Definition: Instrumenter.h:20
Unconditional taken branch.
Definition: Instrumenter.h:26
Integer instruction.
Definition: Instrumenter.h:22
Definition: Instrumenter.h:36
Instruction is a branch.
Definition: Instrumenter.h:18
Floating point instruction.
Definition: Instrumenter.h:23
TEMU_IFACE_REFERENCE_TYPE(temu_Instrumenter)
Arithmetic instruction.
Definition: Instrumenter.h:24
Annulled branch.
Definition: Instrumenter.h:25
Instruction is a store.
Definition: Instrumenter.h:21