-
Notifications
You must be signed in to change notification settings - Fork 19
/
AsmCode.h
30 lines (24 loc) · 1.04 KB
/
AsmCode.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
#pragma once
#define Mod_M 0xc0
#define RM_M 0x7
#define Base_M 0x7
#define REX_W 0x8
#define MAX_INSN_LEN_x86 15
#define MAX_INSN_LEN_x86_32 MAX_INSN_LEN_x86
#define MAX_INSN_LEN_x86_64 MAX_INSN_LEN_x86
enum __bits { __b16, __b32, __b64 };
#ifdef __i386__
#define insn_len(insn) insn_len_x86_32(insn)
#define MAX_INSN_LEN MAX_INSN_LEN_x86_32
#elif defined(__x86_64__)
#define insn_len(insn) insn_len_x86_64(insn)
#define MAX_INSN_LEN MAX_INSN_LEN_x86_64
#endif
/*==============================================================================*/
/* »ñÈ¡32λָÁ¶È */
/*==============================================================================*/
int insn_len_x86_32(void *insn);
/*==============================================================================*/
/* »ñÈ¡64λָÁ¶È */
/*==============================================================================*/
int insn_len_x86_64(void *insn);