/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
*
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#ifndef _SYS_REGSET_H
#define _SYS_REGSET_H
#include <sys/feature_tests.h>
#if !defined(_ASM)
#endif
#include <sys/mcontext.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* The names and offsets defined here should be specified by the
* AMD64 ABI suppl.
*
* We make fsbase and gsbase part of the lwp context (since they're
* the only way to access the full 64-bit address range via the segment
* registers) and thus belong here too. However we treat them as
* read-only; if %fs or %gs are updated, the results of the descriptor
* table lookup that those updates implicitly cause will be reflected
* context can be inspected. However it is NOT possible to override
*
* Direct modification of the base registers (thus overriding the
* descriptor table base address) can be achieved with _lwp_setprivate.
*/
#define REG_R15 0
/*
* The names and offsets defined here are specified by i386 ABI suppl.
*/
#define GS 0
/* aliases for portability */
#if defined(__amd64)
#else /* __i386 */
#endif /* __i386 */
#if !defined(_ASM)
#ifdef __i386
/*
* (This structure definition is specified in the i386 ABI supplement)
* It's likely we can just get rid of the struct __old_fpu or maybe
* only place that uses it. See: www.illumos.org/issues/6284
*/
typedef struct __old_fpu {
union {
{
/* exception */
} fpchip_state;
{
} fp_reg_set;
#endif /* __i386 */
#if defined(__amd64)
#else
#endif
typedef struct dbregset {
} dbregset_t;
#endif /* _ASM */
/*
* The version of privregs.h that is used on implementations that run on
* processors that support the AMD64 instruction set is deliberately not
* imported here.
*
* The amd64 'struct regs' definition may -not- compatible with either
* 32-bit or 64-bit core file contents, nor with the ucontext. As a result,
* the 'regs' structure cannot be used portably by applications, and should
* only be used by the kernel implementation.
*
* The inclusion of the i386 version of privregs.h allows for some limited
* source compatibility with 32-bit applications who expect to use
* 'struct regs' to match the context of a 32-bit core file, or a ucontext_t.
*
* Note that the ucontext_t actually describes the general register in terms
* of the gregset_t data type, as described in this file. Note also
* that the core file content is defined by core(4) in terms of data types
* defined by procfs -- see proc(4).
*/
#if defined(__i386) && \
#include <sys/privregs.h>
#endif /* __i386 (!_KERNEL && !_XPG4_2 || __EXTENSIONS__) */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_REGSET_H */