xref: /freebsd-src/cddl/contrib/opensolaris/lib/libdtrace/i386/regs.sed.in (revision 7aa383846770374466b1dcb2cefd71bde9acf463)
1*7aa38384SRui Paulo/*
2*7aa38384SRui Paulo * CDDL HEADER START
3*7aa38384SRui Paulo *
4*7aa38384SRui Paulo * The contents of this file are subject to the terms of the
5*7aa38384SRui Paulo * Common Development and Distribution License, Version 1.0 only
6*7aa38384SRui Paulo * (the "License").  You may not use this file except in compliance
7*7aa38384SRui Paulo * with the License.
8*7aa38384SRui Paulo *
9*7aa38384SRui Paulo * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7aa38384SRui Paulo * or http://www.opensolaris.org/os/licensing.
11*7aa38384SRui Paulo * See the License for the specific language governing permissions
12*7aa38384SRui Paulo * and limitations under the License.
13*7aa38384SRui Paulo *
14*7aa38384SRui Paulo * When distributing Covered Code, include this CDDL HEADER in each
15*7aa38384SRui Paulo * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7aa38384SRui Paulo * If applicable, add the following below this CDDL HEADER, with the
17*7aa38384SRui Paulo * fields enclosed by brackets "[]" replaced with your own identifying
18*7aa38384SRui Paulo * information: Portions Copyright [yyyy] [name of copyright owner]
19*7aa38384SRui Paulo *
20*7aa38384SRui Paulo * CDDL HEADER END
21*7aa38384SRui Paulo */
22*7aa38384SRui Paulo/*
23*7aa38384SRui Paulo * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24*7aa38384SRui Paulo * Use is subject to license terms.
25*7aa38384SRui Paulo */
26*7aa38384SRui Paulo
27*7aa38384SRui Paulo#pragma ident	"%Z%%M%	%I%	%E% SMI"
28*7aa38384SRui Paulo
29*7aa38384SRui Paulo/*
30*7aa38384SRui Paulo * This file is a sed script which is first preprocessed by cpp or cc -E to
31*7aa38384SRui Paulo * define a set of sed directives which replace #define tokens with their
32*7aa38384SRui Paulo * values.  After preprocessing, whitespace is eliminated, and any @ symbols
33*7aa38384SRui Paulo * are translated into single space.  The resulting sed script is then run
34*7aa38384SRui Paulo * over regs.d.in to replace the #define tokens listed below to create the
35*7aa38384SRui Paulo * finished regs.d.  Refer to the rules in libdtrace/i386/Makefile for more
36*7aa38384SRui Paulo * information.
37*7aa38384SRui Paulo */
38*7aa38384SRui Paulo
39*7aa38384SRui Paulo#include <sys/regset.h>
40*7aa38384SRui Paulo
41*7aa38384SRui Paulo#define	SED_REPLACE(x)		s/#x/x/g
42*7aa38384SRui Paulo#define	SED_REPLACE64(x)	s/#x/SS @+@1@+@ x/g
43*7aa38384SRui Paulo
44*7aa38384SRui PauloSED_REPLACE(GS)
45*7aa38384SRui PauloSED_REPLACE(FS)
46*7aa38384SRui PauloSED_REPLACE(ES)
47*7aa38384SRui PauloSED_REPLACE(DS)
48*7aa38384SRui PauloSED_REPLACE(EDI)
49*7aa38384SRui PauloSED_REPLACE(ESI)
50*7aa38384SRui PauloSED_REPLACE(EBP)
51*7aa38384SRui PauloSED_REPLACE(ESP)
52*7aa38384SRui PauloSED_REPLACE(EBX)
53*7aa38384SRui PauloSED_REPLACE(EDX)
54*7aa38384SRui PauloSED_REPLACE(ECX)
55*7aa38384SRui PauloSED_REPLACE(EAX)
56*7aa38384SRui PauloSED_REPLACE(TRAPNO)
57*7aa38384SRui PauloSED_REPLACE(ERR)
58*7aa38384SRui PauloSED_REPLACE(EIP)
59*7aa38384SRui PauloSED_REPLACE(CS)
60*7aa38384SRui PauloSED_REPLACE(EFL)
61*7aa38384SRui PauloSED_REPLACE(UESP)
62*7aa38384SRui PauloSED_REPLACE(SS)
63*7aa38384SRui Paulo
64*7aa38384SRui PauloSED_REPLACE64(REG_RSP)
65*7aa38384SRui PauloSED_REPLACE64(REG_RFL)
66*7aa38384SRui PauloSED_REPLACE64(REG_RIP)
67*7aa38384SRui PauloSED_REPLACE64(REG_RAX)
68*7aa38384SRui PauloSED_REPLACE64(REG_RCX)
69*7aa38384SRui PauloSED_REPLACE64(REG_RDX)
70*7aa38384SRui PauloSED_REPLACE64(REG_RBX)
71*7aa38384SRui PauloSED_REPLACE64(REG_RBP)
72*7aa38384SRui PauloSED_REPLACE64(REG_RSI)
73*7aa38384SRui PauloSED_REPLACE64(REG_RDI)
74*7aa38384SRui PauloSED_REPLACE64(REG_R8)
75*7aa38384SRui PauloSED_REPLACE64(REG_R9)
76*7aa38384SRui PauloSED_REPLACE64(REG_R10)
77*7aa38384SRui PauloSED_REPLACE64(REG_R11)
78*7aa38384SRui PauloSED_REPLACE64(REG_R12)
79*7aa38384SRui PauloSED_REPLACE64(REG_R13)
80*7aa38384SRui PauloSED_REPLACE64(REG_R14)
81*7aa38384SRui PauloSED_REPLACE64(REG_R15)
82*7aa38384SRui Paulo
83