procfs_isa.h revision 61679b0b6826b0ae7e3f751acd91412fcfa45d1e
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 (c) 1996-1998 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_PROCFS_ISA_H
#define _SYS_PROCFS_ISA_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* Possible values of pr_dmodel.
* This isn't isa-specific, but it needs to be defined here for other reasons.
*/
#define PR_MODEL_UNKNOWN 0
/*
* To determine whether application is running native.
*/
#if defined(_LP64)
#define PR_MODEL_NATIVE PR_MODEL_LP64
#define PR_MODEL_NATIVE PR_MODEL_ILP32
#else
#error "No DATAMODEL_NATIVE specified"
#endif /* _LP64 || _ILP32 */
/*
* Holds one sparc instruction, for both ILP32 and LP64.
*/
/*
* General register access (sparc).
* Registers are 32 bits for ILP32, 64 bits for LP64.
*/
#define NPRGREG 38
typedef long prgreg_t;
#else
typedef int prgreg_t;
#endif
#define R_G0 0
#define R_G1 1
#define R_G2 2
#define R_G3 3
#define R_G4 4
#define R_G5 5
#define R_G6 6
#define R_G7 7
#define R_O0 8
#define R_O1 9
#define R_O2 10
#define R_O3 11
#define R_O4 12
#define R_O5 13
#define R_O6 14
#define R_O7 15
#define R_L0 16
#define R_L1 17
#define R_L2 18
#define R_L3 19
#define R_L4 20
#define R_L5 21
#define R_L6 22
#define R_L7 23
#define R_I0 24
#define R_I1 25
#define R_I2 26
#define R_I3 27
#define R_I4 28
#define R_I5 29
#define R_I6 30
#define R_I7 31
#ifdef __sparcv9
#else
#endif
#define R_PC 33
#define R_nPC 34
#define R_Y 35
#ifdef __sparcv9
#define R_ASI 36
#define R_FPRS 37
#else
#define R_WIM 36
#define R_TBR 37
#endif
/*
* The following defines are for portability.
*/
#ifdef __sparcv9
#else
#endif
#if defined(_SYSCALL32)
/*
* kernel view of the _ILP32 register set
*/
typedef int32_t prgreg32_t;
#define R_PSR 32
#define R_WIM 36
#define R_TBR 37
#endif
/*
* Floating-point register access (sparc FPU).
*/
#ifdef __sparcv9
typedef struct prfpregset {
union { /* FPU floating point regs */
} pr_fr;
} prfpregset_t;
#else
typedef struct prfpregset {
union { /* FPU floating point regs */
} pr_fr;
} prfpregset_t;
#endif /* __sparcv9 */
#if defined(_SYSCALL32)
/*
* kernel view of the _ILP32 floating point register set
*/
typedef struct prfpregset32 {
union { /* FPU floating point regs */
} pr_fr;
#endif /* _SYSCALL32 */
/*
* Extra register access
*/
#define XR_G0 0
#define XR_G1 1
#define XR_G2 2
#define XR_G3 3
#define XR_G4 4
#define XR_G5 5
#define XR_G6 6
#define XR_G7 7
#define NPRXGREG 8
#define XR_O0 0
#define XR_O1 1
#define XR_O2 2
#define XR_O3 3
#define XR_O4 4
#define XR_O5 5
#define XR_O6 6
#define XR_O7 7
#define NPRXOREG 8
#define NPRXFILLER 8
typedef struct prxregset {
union {
struct pr_v8p {
union { /* extra FP registers */
double pr_dregs[16];
#ifndef __sparcv9 /* 32-bit alignment problem */
long double pr_qregs[8];
#endif
} pr_xfr;
} pr_v8p;
} pr_un;
} prxregset_t;
/*
* Given a pointer to a prxregset structure, this macro yields the value
* of the %gsr embedded in the structure. It is an lvalue, so it can
* be used to assign the value of the %gsr into the structure.
* (Please don't ask why this is done this way.)
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PROCFS_ISA_H */