-
Notifications
You must be signed in to change notification settings - Fork 0
/
ModRM.h
58 lines (42 loc) · 1.14 KB
/
ModRM.h
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef MODRM_H_
#define MODRM_H_
#include "Emulator.h"
class ModRM {
private:
Emulator *emu;
public:
ModRM(Emulator *emu, sig_ucontext_t* uc);
// ~ModRM();
void Parse(Emulator *emu, sig_ucontext_t* uc);
void Parse();
uint8_t GetRM8(Emulator *emu);
uint8_t GetRM8();
void SetRM8(Emulator *emu, uint8_t val);
void SetRM8(uint8_t val);
uint16_t GetRM16(Emulator *emu);
uint16_t GetRM16();
void SetRM16(Emulator *emu, uint16_t val);
void SetRM16(uint16_t val);
uint32_t GetRM32(Emulator *emu);
uint32_t GetRM32();
void SetRM32(Emulator *emu, uint32_t val);
void SetRM32(uint32_t val);
uint8_t GetR8(Emulator *emu);
uint8_t GetR8();
void SetR8(Emulator *emu, uint8_t val);
void SetR8(uint8_t val);
uint16_t SetR16(Emulator *emu, uint16_t val);
uint16_t SetR16(uint16_t val);
uint32_t calc_sib(void);
uint32_t get_m(void);
uint16_t GetR16(Emulator *emu);
uint16_t GetR16();
uint32_t GetR32(Emulator *emu);
uint32_t GetR32();
void SetR32(Emulator *emu, uint32_t val);
void SetR32(uint32_t val);
uint32_t CalcMemAddr32(Emulator *emu);
uint32_t CalcMemAddr16(Emulator *emu);
uint32_t CalcMemAddr();
};
#endif //MODRM_H_