libucontext/arch/x86_64/defs.h

106 lines
1.3 KiB
C
Raw Normal View History

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