2018-02-01 01:26:34 +00:00
|
|
|
#ifndef __ARCH_X86_DEFS_H
|
|
|
|
#define __ARCH_X86_DEFS_H
|
|
|
|
|
2020-03-29 15:04:03 +00:00
|
|
|
#ifndef REG_GS
|
|
|
|
# define REG_GS (0)
|
2020-12-06 11:24:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_FS
|
2020-03-29 15:04:03 +00:00
|
|
|
# define REG_FS (1)
|
2020-12-06 11:24:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_ES
|
2020-03-29 15:04:03 +00:00
|
|
|
# define REG_ES (2)
|
2020-12-06 11:24:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_DS
|
2020-03-29 15:04:03 +00:00
|
|
|
# define REG_DS (3)
|
2020-12-06 11:24:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_EDI
|
2020-03-29 15:04:03 +00:00
|
|
|
# define REG_EDI (4)
|
2020-12-06 11:24:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_ESI
|
2020-03-29 15:04:03 +00:00
|
|
|
# define REG_ESI (5)
|
2020-12-06 11:24:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_EBP
|
2020-03-29 15:04:03 +00:00
|
|
|
# define REG_EBP (6)
|
2020-12-06 11:24:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_ESP
|
2020-03-29 15:04:03 +00:00
|
|
|
# define REG_ESP (7)
|
2020-12-06 11:24:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_EBX
|
2020-03-29 15:04:03 +00:00
|
|
|
# define REG_EBX (8)
|
2020-12-06 11:24:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_EDX
|
2020-03-29 15:04:03 +00:00
|
|
|
# define REG_EDX (9)
|
2020-12-06 11:24:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_ECX
|
2020-03-29 15:04:03 +00:00
|
|
|
# define REG_ECX (10)
|
2020-12-06 11:24:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_EAX
|
2020-03-29 15:04:03 +00:00
|
|
|
# define REG_EAX (11)
|
2020-12-06 11:24:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_EIP
|
2020-03-29 15:04:03 +00:00
|
|
|
# define REG_EIP (14)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define REG_SZ (4)
|
|
|
|
|
|
|
|
#define MCONTEXT_GREGS (20)
|
|
|
|
|
2020-12-12 06:32:01 +00:00
|
|
|
#define FETCH_LINKPTR(dest) \
|
2021-01-03 02:17:28 +00:00
|
|
|
asm("movl (%%esp, %%ebx, 4), %0" : "=r" ((dest)));
|
2020-12-12 06:32:01 +00:00
|
|
|
|
2020-03-29 15:04:03 +00:00
|
|
|
#include "common-defs.h"
|
2018-02-01 01:26:34 +00:00
|
|
|
|
|
|
|
#endif
|