xref: /freebsd/cddl/lib/libdtrace/regs_x86.d (revision 9034852c84a13f0e3b5527e1c886ca94b2863b2b)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  *
22  * Portions Copyright 2009 Stacey Son sson@FreeBSD.org
23  *
24  * $FreeBSD$
25  */
26 /*
27  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 inline int R_GS = 0;
32 #pragma D binding "1.0" R_GS
33 inline int R_FS = 1;
34 #pragma D binding "1.0" R_FS
35 inline int R_ES = 2;
36 #pragma D binding "1.0" R_ES
37 inline int R_DS = 3;
38 #pragma D binding "1.0" R_DS
39 
40 inline int R_EDI = 4;
41 #pragma D binding "1.0" R_EDI
42 inline int R_ESI = 5;
43 #pragma D binding "1.0" R_ESI
44 inline int R_EBP = 6;
45 #pragma D binding "1.0" R_EBP
46 inline int R_ESP = 7;
47 #pragma D binding "1.0" R_ESP
48 inline int R_EBX = 8;
49 #pragma D binding "1.0" R_EBX
50 inline int R_EDX = 9;
51 #pragma D binding "1.0" R_EDX
52 inline int R_ECX = 10;
53 #pragma D binding "1.0" R_ECX
54 inline int R_EAX = 11;
55 #pragma D binding "1.0" R_EAX
56 
57 inline int R_TRAPNO = 12;
58 #pragma D binding "1.0" R_TRAPNO
59 inline int R_ERR = 13;
60 #pragma D binding "1.0" R_ERR
61 inline int R_EIP = 14;
62 #pragma D binding "1.0" R_EIP
63 inline int R_CS = 15;
64 #pragma D binding "1.0" R_CS
65 inline int R_EFL = 16;
66 #pragma D binding "1.0" R_EFL
67 inline int R_UESP = 17;
68 #pragma D binding "1.0" R_UESP
69 inline int R_SS = 18;
70 #pragma D binding "1.0" R_SS
71 
72 inline int R_PC = R_EIP;
73 #pragma D binding "1.0" R_PC
74 inline int R_SP = R_UESP;
75 #pragma D binding "1.0" R_SP
76 inline int R_PS = R_EFL;
77 #pragma D binding "1.0" R_PS
78 inline int R_R0 = R_EAX;
79 #pragma D binding "1.0" R_R0
80 inline int R_R1 = R_EBX;
81 #pragma D binding "1.0" R_R1
82 
83 inline int R_RSP = 18 + 1 + 20;
84 #pragma D binding "1.0" R_RSP
85 inline int R_RFL = 18 + 1 + 19;
86 #pragma D binding "1.0" R_RFL
87 inline int R_RIP = 18 + 1 + 17;
88 #pragma D binding "1.0" R_RIP
89 inline int R_RAX = 18 + 1 + 14;
90 #pragma D binding "1.0" R_RAX
91 inline int R_RCX = 18 + 1 + 13;
92 #pragma D binding "1.0" R_RCX
93 inline int R_RDX = 18 + 1 + 12;
94 #pragma D binding "1.0" R_RDX
95 inline int R_RBX = 18 + 1 + 11;
96 #pragma D binding "1.0" R_RBX
97 inline int R_RBP = 18 + 1 + 10;
98 #pragma D binding "1.0" R_RBP
99 inline int R_RSI = 18 + 1 + 9;
100 #pragma D binding "1.0" R_RSI
101 inline int R_RDI = 18 + 1 + 8;
102 #pragma D binding "1.0" R_RDI
103 inline int R_R8 = 18 + 1 + 7;
104 #pragma D binding "1.0" R_R8
105 inline int R_R9 = 18 + 1 + 6;
106 #pragma D binding "1.0" R_R9
107 inline int R_R10 = 18 + 1 + 5;
108 #pragma D binding "1.0" R_R10
109 inline int R_R11 = 18 + 1 + 4;
110 #pragma D binding "1.0" R_R11
111 inline int R_R12 = 18 + 1 + 3;
112 #pragma D binding "1.0" R_R12
113 inline int R_R13 = 18 + 1 + 2;
114 #pragma D binding "1.0" R_R13
115 inline int R_R14 = 18 + 1 + 1;
116 #pragma D binding "1.0" R_R14
117 inline int R_R15 = 18 + 1 + 0;
118 #pragma D binding "1.0" R_R15
119 
120