summaryrefslogtreecommitdiff
path: root/arch/x86_64/bits
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2012-12-06 18:14:45 +0100
committerrofl0r <retnyg@gmx.net>2012-12-06 18:14:49 +0100
commita631c5df53c22146389228f228506936e258379b (patch)
tree0198dd09fda0f944d0ee15c58b63e0de75a5968e /arch/x86_64/bits
parent120e402de66bf0791a4f76dd1ee0e089809814f3 (diff)
downloadmusl-a631c5df53c22146389228f228506936e258379b.tar.gz
bits/signal.h: add register names for x86(_64)
glibc exposes them from ucontext.h. since that header includes signal.h, it is safe to put them into bits/signal.h, if _GNU_SOURCE is defined.
Diffstat (limited to 'arch/x86_64/bits')
-rw-r--r--arch/x86_64/bits/signal.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/x86_64/bits/signal.h b/arch/x86_64/bits/signal.h
index 9043aeaf..069c6c33 100644
--- a/arch/x86_64/bits/signal.h
+++ b/arch/x86_64/bits/signal.h
@@ -52,6 +52,30 @@ typedef struct __ucontext {
#define SA_RESETHAND 0x80000000
#define SA_RESTORER 0x04000000
+#define REG_R8 0
+#define REG_R9 1
+#define REG_R10 2
+#define REG_R11 3
+#define REG_R12 4
+#define REG_R13 5
+#define REG_R14 6
+#define REG_R15 7
+#define REG_RDI 8
+#define REG_RSI 9
+#define REG_RBP 10
+#define REG_RBX 11
+#define REG_RDX 12
+#define REG_RAX 13
+#define REG_RCX 14
+#define REG_RSP 15
+#define REG_RIP 16
+#define REG_EFL 17
+#define REG_CSGFS 18
+#define REG_ERR 19
+#define REG_TRAPNO 20
+#define REG_OLDMASK 21
+#define REG_CR2 22
+
#endif
#define SIGHUP 1
@@ -89,3 +113,4 @@ typedef struct __ucontext {
#define SIGUNUSED SIGSYS
#define _NSIG 65
+