1 /* $NetBSD: reg.h,v 1.4 2000/06/08 03:10:06 thorpej Exp $ */ 2 3 /* 4 * Copyright (c) 1994, 1995 Carnegie-Mellon University. 5 * All rights reserved. 6 * 7 * Author: Chris G. Demetriou 8 * 9 * Permission to use, copy, modify and distribute this software and 10 * its documentation is hereby granted, provided that both the copyright 11 * notice and this permission notice appear in all copies of the 12 * software, derivative works or modified versions, and any portions 13 * thereof, and that both notices appear in supporting documentation. 14 * 15 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 16 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 17 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 18 * 19 * Carnegie Mellon requests users of this software to return to 20 * 21 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 22 * School of Computer Science 23 * Carnegie Mellon University 24 * Pittsburgh PA 15213-3890 25 * 26 * any improvements or extensions that they make and grant Carnegie the 27 * rights to redistribute these changes. 28 */ 29 30 #ifndef _ALPHA_REG_H_ 31 #define _ALPHA_REG_H_ 32 33 /* 34 * XXX where did this info come from? 35 */ 36 37 /* 38 * Struct reg, used for procfs and in signal contexts 39 * Note that in signal contexts, it's represented as an array. 40 * That array has to look exactly like 'struct reg' though. 41 */ 42 #define R_V0 0 43 #define R_T0 1 44 #define R_T1 2 45 #define R_T2 3 46 #define R_T3 4 47 #define R_T4 5 48 #define R_T5 6 49 #define R_T6 7 50 #define R_T7 8 51 #define R_S0 9 52 #define R_S1 10 53 #define R_S2 11 54 #define R_S3 12 55 #define R_S4 13 56 #define R_S5 14 57 #define R_S6 15 58 #define R_A0 16 59 #define R_A1 17 60 #define R_A2 18 61 #define R_A3 19 62 #define R_A4 20 63 #define R_A5 21 64 #define R_T8 22 65 #define R_T9 23 66 #define R_T10 24 67 #define R_T11 25 68 #define R_RA 26 69 #define R_T12 27 70 #define R_AT 28 71 #define R_GP 29 72 #define R_SP 30 73 #define R_ZERO 31 74 75 struct reg { 76 u_int64_t r_regs[32]; 77 }; 78 79 /* 80 * Floating point unit state. (also, register set used for ptrace.) 81 * 82 * The floating point registers for a process, saved only when 83 * necessary. 84 * 85 * Note that in signal contexts, it's represented as an array. 86 * That array has to look exactly like 'struct reg' though. 87 */ 88 struct fpreg { 89 u_int64_t fpr_regs[32]; 90 u_int64_t fpr_cr; 91 }; 92 93 #ifdef _KERNEL 94 void restorefpstate(struct fpreg *); 95 void savefpstate(struct fpreg *); 96 #endif 97 98 #endif /* _ALPHA_REG_H_ */ 99