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