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