about summary refs log tree commit diff stats
path: root/src/dynarec/dynablock_private.h
blob: e73d35bafb1a0cb03b7d563901c56a72792bc2b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef __DYNABLOCK_PRIVATE_H_
#define __DYNABLOCK_PRIVATE_H_

typedef struct dynablocklist_s  dynablocklist_t;

typedef struct instsize_s {
    unsigned int x64:4;
    unsigned int nat:4;
} instsize_t;

typedef struct dynablock_s {
    dynablocklist_t* parent;
    void*           block;
    int             size;
    void*           x64_addr;
    uintptr_t       x64_size;
    uint32_t        hash;
    uint8_t         need_test;
    uint8_t         done;
    uint8_t         gone;
    uint8_t         dummy;
    int             isize;
    dynablock_t**   sons;   // sons (kind-of dummy dynablock...)
    int             sons_size;
    dynablock_t*    father; // set only in the case of a son
    instsize_t*     instsize;
} dynablock_t;

typedef struct dynablocklist_s {
    uintptr_t           text;
    int                 textsz;
    uintptr_t           maxend;    // max address end for anyblock on this blocklist
    uintptr_t           minstart;  // min start address for block overlapping this blocklist
    dynablock_t**       direct;    // direct mapping (waste of space, so the array is created at first write)
} dynablocklist_t;

#endif //__DYNABLOCK_PRIVATE_H_