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/*
23 * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26
27/*
28 * This file is a sed script which is first preprocessed by cpp or cc -E to
29 * define a set of sed directives which replace #define tokens with their
30 * values.  After preprocessing, whitespace is eliminated, and any @ symbols
31 * are translated into single space.  The resulting sed script is then run
32 * over regs.d.in to replace the #define tokens listed below to create the
33 * finished regs.d.  Refer to the rules in libdtrace/i386/Makefile for more
34 * information.
35 */
36
37#include <sys/regset.h>
38
39#define	SED_REPLACE(x)		s/#x/x/g
40#define	SED_REPLACE64(x)	s/#x/SS @+@1@+@ x/g
41
42SED_REPLACE(GS)
43SED_REPLACE(FS)
44SED_REPLACE(ES)
45SED_REPLACE(DS)
46SED_REPLACE(EDI)
47SED_REPLACE(ESI)
48SED_REPLACE(EBP)
49SED_REPLACE(ESP)
50SED_REPLACE(EBX)
51SED_REPLACE(EDX)
52SED_REPLACE(ECX)
53SED_REPLACE(EAX)
54SED_REPLACE(TRAPNO)
55SED_REPLACE(ERR)
56SED_REPLACE(EIP)
57SED_REPLACE(CS)
58SED_REPLACE(EFL)
59SED_REPLACE(UESP)
60SED_REPLACE(SS)
61
62SED_REPLACE64(REG_RSP)
63SED_REPLACE64(REG_RFL)
64SED_REPLACE64(REG_RIP)
65SED_REPLACE64(REG_RAX)
66SED_REPLACE64(REG_RCX)
67SED_REPLACE64(REG_RDX)
68SED_REPLACE64(REG_RBX)
69SED_REPLACE64(REG_RBP)
70SED_REPLACE64(REG_RSI)
71SED_REPLACE64(REG_RDI)
72SED_REPLACE64(REG_R8)
73SED_REPLACE64(REG_R9)
74SED_REPLACE64(REG_R10)
75SED_REPLACE64(REG_R11)
76SED_REPLACE64(REG_R12)
77SED_REPLACE64(REG_R13)
78SED_REPLACE64(REG_R14)
79SED_REPLACE64(REG_R15)
80
81