-
Notifications
You must be signed in to change notification settings - Fork 9
/
X86_register.h
executable file
·165 lines (151 loc) · 2.56 KB
/
X86_register.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/*
*
* Written by Dennis Yurichev <dennis(a)yurichev.com>, 2013
*
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/.
*
*/
#pragma once
#include <windows.h>
#include "lisp.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum X86_register_t
{
R_ABSENT=0, // should always be zero!
R_AH,
R_AL,
R_AX,
R_BH,
R_BL,
R_BP,
R_BX,
R_CH,
R_CL,
R_CS,
R_CX,
R_DH,
R_DI,
R_DL,
R_DS,
R_DX,
R_EAX,
R_EBX,
R_ECX,
R_EDX,
R_ESI,
R_EDI,
R_EBP,
R_ESP,
R_EIP,
R_ES,
R_FS,
R_GS,
R_SI,
R_SP,
R_SS,
R_ST0,
R_ST1,
R_ST2,
R_ST3,
R_ST4,
R_ST5,
R_ST6,
R_ST7,
R_XMM0,
R_XMM1,
R_XMM2,
R_XMM3,
R_XMM4,
R_XMM5,
R_XMM6,
R_XMM7,
R_XMM8,
R_XMM9,
R_XMM10,
R_XMM11,
R_XMM12,
R_XMM13,
R_XMM14,
R_XMM15,
R_MM0,
R_MM1,
R_MM2,
R_MM3,
R_MM4,
R_MM5,
R_MM6,
R_MM7,
R_RAX,
R_RBX,
R_RCX,
R_RDX,
R_RSI,
R_RDI,
R_RSP,
R_RBP,
R_RIP,
R_R8,
R_R9,
R_R10,
R_R11,
R_R12,
R_R13,
R_R14,
R_R15,
R_R8D,
R_R9D,
R_R10D,
R_R11D,
R_R12D,
R_R13D,
R_R14D,
R_R15D,
R_R8W,
R_R9W,
R_R10W,
R_R11W,
R_R12W,
R_R13W,
R_R14W,
R_R15W,
R_R8L,
R_R9L,
R_R10L,
R_R11L,
R_R12L,
R_R13L,
R_R14L,
R_R15L,
R_SPL,
R_BPL,
R_SIL,
R_DIL,
R_PF,
R_SF,
R_AF,
R_ZF,
R_OF,
R_CF,
R_DF,
R_TF
} X86_register;
X86_register X86_register_from_string (const char* s);
//bool X86_register_from_string (const char* s, X86_register *out);
bool X86_register_is_flag (X86_register r);
bool X86_register_is_STx (X86_register r);
const char* X86_register_ToString (X86_register r);
enum obj_type X86_register_get_type (X86_register r);
bool X86_register_is_ExX_ExI(X86_register r);
bool X86_register_is_xX_xI(X86_register r);
bool X86_register_is_xH(X86_register r);
bool X86_register_is_xL(X86_register r);
bool X86_register_is_segment(X86_register r);
bool X86_register_is_XMMx(X86_register r);
X86_register X86_register_get_32bit_part_of(X86_register r);
#ifdef __cplusplus
}
#endif
/* vim: set expandtab ts=4 sw=4 : */