2020-03-29 14:27:40 +00:00
|
|
|
#ifndef __ARCH_X86_64_DEFS_H
|
|
|
|
#define __ARCH_X86_64_DEFS_H
|
|
|
|
|
2021-03-08 22:02:58 +00:00
|
|
|
#ifndef REG_R8
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_R8 (0)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_R9
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_R9 (1)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_R10
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_R10 (2)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_R11
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_R11 (3)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_R12
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_R12 (4)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_R13
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_R13 (5)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_R14
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_R14 (6)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_R15
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_R15 (7)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_RDI
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_RDI (8)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_RSI
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_RSI (9)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_RBP
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_RBP (10)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_RBX
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_RBX (11)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_RDX
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_RDX (12)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_RAX
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_RAX (13)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_RCX
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_RCX (14)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_RSP
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_RSP (15)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_RIP
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_RIP (16)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_EFL
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_EFL (17)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_CSGSFS
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_CSGSFS (18)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_ERR
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_ERR (19)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_TRAPNO
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_TRAPNO (20)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_OLDMASK
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_OLDMASK (21)
|
2021-03-08 22:02:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REG_CR2
|
2020-03-29 14:27:40 +00:00
|
|
|
# define REG_CR2 (22)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define MCONTEXT_GREGS (40)
|
|
|
|
|
2020-03-29 14:50:38 +00:00
|
|
|
#define REG_SZ (8)
|
2020-03-29 14:27:40 +00:00
|
|
|
|
2020-12-12 06:04:47 +00:00
|
|
|
#define FETCH_LINKPTR(dest) \
|
2021-01-03 02:17:28 +00:00
|
|
|
asm("movq (%%rbx), %0" : "=r" ((dest)));
|
2020-12-12 06:04:47 +00:00
|
|
|
|
2020-03-29 14:27:40 +00:00
|
|
|
#include "common-defs.h"
|
|
|
|
|
|
|
|
#endif
|