1 | //レジスタを示す定数
|
---|
2 | #define REG_EAX 1
|
---|
3 | #define REG_EBX 2
|
---|
4 | #define REG_ECX 3
|
---|
5 | #define REG_EDX 4
|
---|
6 | #define REG_ESP 5
|
---|
7 | #define REG_EBP 6
|
---|
8 |
|
---|
9 | #define REGISTER_OPERAND(reg) (reg&0x07)
|
---|
10 |
|
---|
11 | #define REG_NON -1
|
---|
12 | #define REG_RAX 0x00 //reg:000
|
---|
13 | #define REG_RCX 0x01 //reg:001
|
---|
14 | #define REG_RDX 0x02 //reg:010
|
---|
15 | #define REG_RBX 0x03 //reg:011
|
---|
16 | #define REG_RSP 0x04 //reg:100
|
---|
17 | #define REG_RBP 0x05 //reg:101
|
---|
18 | #define REG_RSI 0x06 //reg:110
|
---|
19 | #define REG_RDI 0x07 //reg:111
|
---|
20 | #define REG_R8 0x08 //reg:000(REXプリフィックス)
|
---|
21 | #define REG_R9 0x09 //reg:001(REXプリフィックス)
|
---|
22 | #define REG_R10 0x0A //reg:010(REXプリフィックス)
|
---|
23 | #define REG_R11 0x0B //reg:011(REXプリフィックス)
|
---|
24 | #define REG_R12 0x0C //reg:100(REXプリフィックス)
|
---|
25 | #define REG_R13 0x0D //reg:101(REXプリフィックス)
|
---|
26 | #define REG_R14 0x0E //reg:110(REXプリフィックス)
|
---|
27 | #define REG_R15 0x0F //reg:111(REXプリフィックス)
|
---|
28 |
|
---|
29 | #define REG_XMM0 0x10 //reg:000
|
---|
30 | #define REG_XMM1 0x11 //reg:001
|
---|
31 | #define REG_XMM2 0x12 //reg:010
|
---|
32 | #define REG_XMM3 0x13 //reg:011
|
---|
33 | #define REG_XMM4 0x14 //reg:100
|
---|
34 | #define REG_XMM5 0x15 //reg:101
|
---|
35 | #define REG_XMM6 0x16 //reg:110
|
---|
36 | #define REG_XMM7 0x17 //reg:111
|
---|
37 | #define REG_XMM8 0x18 //reg:000
|
---|
38 | #define REG_XMM9 0x19 //reg:001
|
---|
39 | #define REG_XMM10 0x1A //reg:010
|
---|
40 | #define REG_XMM11 0x1B //reg:011
|
---|
41 | #define REG_XMM12 0x1C //reg:100
|
---|
42 | #define REG_XMM13 0x1D //reg:101
|
---|
43 | #define REG_XMM14 0x1E //reg:110
|
---|
44 | #define REG_XMM15 0x1F //reg:111
|
---|
45 |
|
---|
46 | #define IS_XMM_REG(reg) (reg&0x10)
|
---|
47 |
|
---|
48 |
|
---|
49 | //Mod(モード)
|
---|
50 | #define MOD_BASE (char)0x00
|
---|
51 | #define MOD_DISP32 (char)0xFF
|
---|
52 | #define MOD_BASE_DISP8 (char)0x40
|
---|
53 | #define MOD_BASE_DISP32 (char)0x80
|
---|
54 | #define MOD_REG (char)0xC0
|
---|
55 |
|
---|
56 | #define USE_OFFSET 1
|
---|
57 | #define NON_OFFSET 0
|
---|