1210198Srpaulo/*
2210198Srpaulo * CDDL HEADER START
3210198Srpaulo *
4210198Srpaulo * The contents of this file are subject to the terms of the
5210198Srpaulo * Common Development and Distribution License, Version 1.0 only
6210198Srpaulo * (the "License").  You may not use this file except in compliance
7210198Srpaulo * with the License.
8210198Srpaulo *
9210198Srpaulo * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10210198Srpaulo * or http://www.opensolaris.org/os/licensing.
11210198Srpaulo * See the License for the specific language governing permissions
12210198Srpaulo * and limitations under the License.
13210198Srpaulo *
14210198Srpaulo * When distributing Covered Code, include this CDDL HEADER in each
15210198Srpaulo * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16210198Srpaulo * If applicable, add the following below this CDDL HEADER, with the
17210198Srpaulo * fields enclosed by brackets "[]" replaced with your own identifying
18210198Srpaulo * information: Portions Copyright [yyyy] [name of copyright owner]
19210198Srpaulo *
20210198Srpaulo * CDDL HEADER END
21210198Srpaulo */
22210198Srpaulo/*
23210198Srpaulo * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24210198Srpaulo * Use is subject to license terms.
25210198Srpaulo */
26210198Srpaulo
27210198Srpaulo#pragma ident	"%Z%%M%	%I%	%E% SMI"
28210198Srpaulo
29210198Srpaulo/*
30210198Srpaulo * This file is a sed script which is first preprocessed by cpp or cc -E to
31210198Srpaulo * define a set of sed directives which replace #define tokens with their
32210198Srpaulo * values.  After preprocessing, whitespace is eliminated, and any @ symbols
33210198Srpaulo * are translated into single space.  The resulting sed script is then run
34210198Srpaulo * over regs.d.in to replace the #define tokens listed below to create the
35210198Srpaulo * finished regs.d.  Refer to the rules in libdtrace/i386/Makefile for more
36210198Srpaulo * information.
37210198Srpaulo */
38210198Srpaulo
39210198Srpaulo#include <sys/regset.h>
40210198Srpaulo
41210198Srpaulo#define	SED_REPLACE(x)		s/#x/x/g
42210198Srpaulo#define	SED_REPLACE64(x)	s/#x/SS @+@1@+@ x/g
43210198Srpaulo
44210198SrpauloSED_REPLACE(GS)
45210198SrpauloSED_REPLACE(FS)
46210198SrpauloSED_REPLACE(ES)
47210198SrpauloSED_REPLACE(DS)
48210198SrpauloSED_REPLACE(EDI)
49210198SrpauloSED_REPLACE(ESI)
50210198SrpauloSED_REPLACE(EBP)
51210198SrpauloSED_REPLACE(ESP)
52210198SrpauloSED_REPLACE(EBX)
53210198SrpauloSED_REPLACE(EDX)
54210198SrpauloSED_REPLACE(ECX)
55210198SrpauloSED_REPLACE(EAX)
56210198SrpauloSED_REPLACE(TRAPNO)
57210198SrpauloSED_REPLACE(ERR)
58210198SrpauloSED_REPLACE(EIP)
59210198SrpauloSED_REPLACE(CS)
60210198SrpauloSED_REPLACE(EFL)
61210198SrpauloSED_REPLACE(UESP)
62210198SrpauloSED_REPLACE(SS)
63210198Srpaulo
64210198SrpauloSED_REPLACE64(REG_RSP)
65210198SrpauloSED_REPLACE64(REG_RFL)
66210198SrpauloSED_REPLACE64(REG_RIP)
67210198SrpauloSED_REPLACE64(REG_RAX)
68210198SrpauloSED_REPLACE64(REG_RCX)
69210198SrpauloSED_REPLACE64(REG_RDX)
70210198SrpauloSED_REPLACE64(REG_RBX)
71210198SrpauloSED_REPLACE64(REG_RBP)
72210198SrpauloSED_REPLACE64(REG_RSI)
73210198SrpauloSED_REPLACE64(REG_RDI)
74210198SrpauloSED_REPLACE64(REG_R8)
75210198SrpauloSED_REPLACE64(REG_R9)
76210198SrpauloSED_REPLACE64(REG_R10)
77210198SrpauloSED_REPLACE64(REG_R11)
78210198SrpauloSED_REPLACE64(REG_R12)
79210198SrpauloSED_REPLACE64(REG_R13)
80210198SrpauloSED_REPLACE64(REG_R14)
81210198SrpauloSED_REPLACE64(REG_R15)
82210198Srpaulo
83