1*eacc5f97Smatt /* $NetBSD: reg.h,v 1.5 2012/02/06 02:14:13 matt Exp $ */ 285854cb4Scgd 385854cb4Scgd /* 485854cb4Scgd * Copyright (c) 1994, 1995 Carnegie-Mellon University. 585854cb4Scgd * All rights reserved. 685854cb4Scgd * 785854cb4Scgd * Author: Chris G. Demetriou 885854cb4Scgd * 985854cb4Scgd * Permission to use, copy, modify and distribute this software and 1085854cb4Scgd * its documentation is hereby granted, provided that both the copyright 1185854cb4Scgd * notice and this permission notice appear in all copies of the 1285854cb4Scgd * software, derivative works or modified versions, and any portions 1385854cb4Scgd * thereof, and that both notices appear in supporting documentation. 1485854cb4Scgd * 1585854cb4Scgd * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 1685854cb4Scgd * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 1785854cb4Scgd * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 1885854cb4Scgd * 1985854cb4Scgd * Carnegie Mellon requests users of this software to return to 2085854cb4Scgd * 2185854cb4Scgd * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 2285854cb4Scgd * School of Computer Science 2385854cb4Scgd * Carnegie Mellon University 2485854cb4Scgd * Pittsburgh PA 15213-3890 2585854cb4Scgd * 2685854cb4Scgd * any improvements or extensions that they make and grant Carnegie the 2785854cb4Scgd * rights to redistribute these changes. 2885854cb4Scgd */ 2985854cb4Scgd 3085854cb4Scgd #ifndef _ALPHA_REG_H_ 3185854cb4Scgd #define _ALPHA_REG_H_ 3285854cb4Scgd 3385854cb4Scgd /* 3485854cb4Scgd * XXX where did this info come from? 3585854cb4Scgd */ 3685854cb4Scgd 3785854cb4Scgd /* 3885854cb4Scgd * Struct reg, used for procfs and in signal contexts 3985854cb4Scgd * Note that in signal contexts, it's represented as an array. 4085854cb4Scgd * That array has to look exactly like 'struct reg' though. 4185854cb4Scgd */ 4285854cb4Scgd #define R_V0 0 4385854cb4Scgd #define R_T0 1 4485854cb4Scgd #define R_T1 2 4585854cb4Scgd #define R_T2 3 4685854cb4Scgd #define R_T3 4 4785854cb4Scgd #define R_T4 5 4885854cb4Scgd #define R_T5 6 4985854cb4Scgd #define R_T6 7 5085854cb4Scgd #define R_T7 8 5185854cb4Scgd #define R_S0 9 5285854cb4Scgd #define R_S1 10 5385854cb4Scgd #define R_S2 11 5485854cb4Scgd #define R_S3 12 5585854cb4Scgd #define R_S4 13 5685854cb4Scgd #define R_S5 14 5785854cb4Scgd #define R_S6 15 5885854cb4Scgd #define R_A0 16 5985854cb4Scgd #define R_A1 17 6085854cb4Scgd #define R_A2 18 6185854cb4Scgd #define R_A3 19 6285854cb4Scgd #define R_A4 20 6385854cb4Scgd #define R_A5 21 6485854cb4Scgd #define R_T8 22 6585854cb4Scgd #define R_T9 23 6685854cb4Scgd #define R_T10 24 6785854cb4Scgd #define R_T11 25 6885854cb4Scgd #define R_RA 26 6985854cb4Scgd #define R_T12 27 7085854cb4Scgd #define R_AT 28 7185854cb4Scgd #define R_GP 29 7285854cb4Scgd #define R_SP 30 7385854cb4Scgd #define R_ZERO 31 7485854cb4Scgd 7585854cb4Scgd struct reg { 76*eacc5f97Smatt uint64_t r_regs[32]; 7785854cb4Scgd }; 7885854cb4Scgd 7985854cb4Scgd /* 8085854cb4Scgd * Floating point unit state. (also, register set used for ptrace.) 8185854cb4Scgd * 8285854cb4Scgd * The floating point registers for a process, saved only when 8385854cb4Scgd * necessary. 8485854cb4Scgd * 8585854cb4Scgd * Note that in signal contexts, it's represented as an array. 8685854cb4Scgd * That array has to look exactly like 'struct reg' though. 8785854cb4Scgd */ 8885854cb4Scgd struct fpreg { 89*eacc5f97Smatt uint64_t fpr_regs[32]; 90*eacc5f97Smatt uint64_t fpr_cr; 9185854cb4Scgd }; 9285854cb4Scgd 9371ab4ed9Sjtc #ifdef _KERNEL 9481afcb39Sthorpej void restorefpstate(struct fpreg *); 9581afcb39Sthorpej void savefpstate(struct fpreg *); 9685854cb4Scgd #endif 9785854cb4Scgd 9885854cb4Scgd #endif /* _ALPHA_REG_H_ */ 99