/*1* CDDL HEADER START2*3* The contents of this file are subject to the terms of the4* Common Development and Distribution License, Version 1.0 only5* (the "License"). You may not use this file except in compliance6* with the License.7*8* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE9* or http://www.opensolaris.org/os/licensing.10* See the License for the specific language governing permissions11* and limitations under the License.12*13* When distributing Covered Code, include this CDDL HEADER in each14* file and include the License file at usr/src/OPENSOLARIS.LICENSE.15* If applicable, add the following below this CDDL HEADER, with the16* fields enclosed by brackets "[]" replaced with your own identifying17* information: Portions Copyright [yyyy] [name of copyright owner]18*19* CDDL HEADER END20*21*/22/*23* Copyright 2004 Sun Microsystems, Inc. All rights reserved.24* Use is subject to license terms.25*/2627/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */2829/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */30/* All Rights Reserved */3132#ifndef _REGSET_H33#define _REGSET_H3435/*36*/3738#ifdef __cplusplus39extern "C" {40#endif4142/*43* The names and offsets defined here should be specified by the44* AMD64 ABI suppl.45*46* We make fsbase and gsbase part of the lwp context (since they're47* the only way to access the full 64-bit address range via the segment48* registers) and thus belong here too. However we treat them as49* read-only; if %fs or %gs are updated, the results of the descriptor50* table lookup that those updates implicitly cause will be reflected51* in the corresponding fsbase and/or gsbase values the next time the52* context can be inspected. However it is NOT possible to override53* the fsbase/gsbase settings via this interface.54*55* Direct modification of the base registers (thus overriding the56* descriptor table base address) can be achieved with _lwp_setprivate.57*/5859#define REG_GSBASE 2760#define REG_FSBASE 2661#define REG_SS 2562#define REG_RSP 2463#define REG_RFL 2364#define REG_CS 2265#define REG_RIP 2166#define REG_DS 2067#define REG_ES 1968#define REG_ERR 1869#define REG_GS 1770#define REG_FS 1671#define REG_TRAPNO 1572#define REG_RAX 1473#define REG_RCX 1374#define REG_RDX 1275#define REG_RBX 1176#define REG_RBP 1077#define REG_RSI 978#define REG_RDI 879#define REG_R8 780#define REG_R9 681#define REG_R10 582#define REG_R11 483#define REG_R12 384#define REG_R13 285#define REG_R14 186#define REG_R15 08788/*89* The names and offsets defined here are specified by i386 ABI suppl.90*/9192#define GS 1893#define SS 17 /* only stored on a privilege transition */94#define UESP 16 /* only stored on a privilege transition */95#define EFL 1596#define CS 1497#define EIP 1398#define ERR 1299#define TRAPNO 11100#define EAX 10101#define ECX 9102#define EDX 8103#define EBX 7104#define ESP 6105#define EBP 5106#define ESI 4107#define EDI 3108#define DS 2109#define ES 1110#define FS 0111112#define REG_PC EIP113#define REG_FP EBP114#define REG_SP UESP115#define REG_PS EFL116#define REG_R0 EAX117#define REG_R1 EDX118119#ifdef __cplusplus120}121#endif122123#endif /* _REGSET_H */124125126