2.9
[glibc/nacl-glibc.git] / sysdeps / unix / sysv / linux / x86_64 / sys / reg.h
blobacb71a2bc5ca25635e303e880d20aabda6f93404
1 /* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
19 #ifndef _SYS_REG_H
20 #define _SYS_REG_H 1
21 #include <bits/wordsize.h>
24 #if __WORDSIZE == 64
25 /* Index into an array of 8 byte longs returned from ptrace for
26 location of the users' stored general purpose registers. */
28 # define R15 0
29 # define R14 1
30 # define R13 2
31 # define R12 3
32 # define RBP 4
33 # define RBX 5
34 # define R11 6
35 # define R10 7
36 # define R9 8
37 # define R8 9
38 # define RAX 10
39 # define RCX 11
40 # define RDX 12
41 # define RSI 13
42 # define RDI 14
43 # define ORIG_RAX 15
44 # define RIP 16
45 # define CS 17
46 # define EFLAGS 18
47 # define RSP 19
48 # define SS 20
49 # define FS_BASE 21
50 # define GS_BASE 22
51 # define DS 23
52 # define ES 24
53 # define FS 25
54 # define GS 26
55 #else
57 /* Index into an array of 4 byte integers returned from ptrace for
58 * location of the users' stored general purpose registers. */
60 # define EBX 0
61 # define ECX 1
62 # define EDX 2
63 # define ESI 3
64 # define EDI 4
65 # define EBP 5
66 # define EAX 6
67 # define DS 7
68 # define ES 8
69 # define FS 9
70 # define GS 10
71 # define ORIG_EAX 11
72 # define EIP 12
73 # define CS 13
74 # define EFL 14
75 # define UESP 15
76 # define SS 16
77 #endif
79 #endif