Home | History | Annotate | Line # | Download | only in include
reg.h revision 1.4
      1  1.4      cgd /*	$NetBSD: reg.h,v 1.4 1994/10/26 21:09:57 cgd Exp $	*/
      2  1.4      cgd 
      3  1.1  deraadt /*
      4  1.1  deraadt  * Copyright (c) 1988 University of Utah.
      5  1.2    glass  * Copyright (c) 1992, 1993
      6  1.2    glass  *	The Regents of the University of California.  All rights reserved.
      7  1.1  deraadt  *
      8  1.1  deraadt  * This code is derived from software contributed to Berkeley by
      9  1.1  deraadt  * the Systems Programming Group of the University of Utah Computer
     10  1.1  deraadt  * Science Department and Ralph Campbell.
     11  1.1  deraadt  *
     12  1.1  deraadt  * Redistribution and use in source and binary forms, with or without
     13  1.1  deraadt  * modification, are permitted provided that the following conditions
     14  1.1  deraadt  * are met:
     15  1.1  deraadt  * 1. Redistributions of source code must retain the above copyright
     16  1.1  deraadt  *    notice, this list of conditions and the following disclaimer.
     17  1.1  deraadt  * 2. Redistributions in binary form must reproduce the above copyright
     18  1.1  deraadt  *    notice, this list of conditions and the following disclaimer in the
     19  1.1  deraadt  *    documentation and/or other materials provided with the distribution.
     20  1.1  deraadt  * 3. All advertising materials mentioning features or use of this software
     21  1.1  deraadt  *    must display the following acknowledgement:
     22  1.1  deraadt  *	This product includes software developed by the University of
     23  1.1  deraadt  *	California, Berkeley and its contributors.
     24  1.1  deraadt  * 4. Neither the name of the University nor the names of its contributors
     25  1.1  deraadt  *    may be used to endorse or promote products derived from this software
     26  1.1  deraadt  *    without specific prior written permission.
     27  1.1  deraadt  *
     28  1.1  deraadt  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     29  1.1  deraadt  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     30  1.1  deraadt  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     31  1.1  deraadt  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     32  1.1  deraadt  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     33  1.1  deraadt  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     34  1.1  deraadt  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     35  1.1  deraadt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     36  1.1  deraadt  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     37  1.1  deraadt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     38  1.1  deraadt  * SUCH DAMAGE.
     39  1.1  deraadt  *
     40  1.1  deraadt  * from: Utah Hdr: reg.h 1.1 90/07/09
     41  1.2    glass  *
     42  1.4      cgd  *	@(#)reg.h	8.2 (Berkeley) 1/11/94
     43  1.1  deraadt  */
     44  1.1  deraadt 
     45  1.1  deraadt /*
     46  1.1  deraadt  * Location of the users' stored
     47  1.1  deraadt  * registers relative to ZERO.
     48  1.1  deraadt  * Usage is p->p_regs[XX].
     49  1.1  deraadt  */
     50  1.1  deraadt #define ZERO	0
     51  1.1  deraadt #define AST	1
     52  1.1  deraadt #define V0	2
     53  1.1  deraadt #define V1	3
     54  1.1  deraadt #define A0	4
     55  1.1  deraadt #define A1	5
     56  1.1  deraadt #define A2	6
     57  1.1  deraadt #define A3	7
     58  1.1  deraadt #define T0	8
     59  1.1  deraadt #define T1	9
     60  1.1  deraadt #define T2	10
     61  1.1  deraadt #define T3	11
     62  1.1  deraadt #define T4	12
     63  1.1  deraadt #define T5	13
     64  1.1  deraadt #define T6	14
     65  1.1  deraadt #define T7	15
     66  1.1  deraadt #define S0	16
     67  1.1  deraadt #define S1	17
     68  1.1  deraadt #define S2	18
     69  1.1  deraadt #define S3	19
     70  1.1  deraadt #define S4	20
     71  1.1  deraadt #define S5	21
     72  1.1  deraadt #define S6	22
     73  1.1  deraadt #define S7	23
     74  1.1  deraadt #define T8	24
     75  1.1  deraadt #define T9	25
     76  1.1  deraadt #define K0	26
     77  1.1  deraadt #define K1	27
     78  1.1  deraadt #define GP	28
     79  1.1  deraadt #define SP	29
     80  1.1  deraadt #define S8	30
     81  1.1  deraadt #define RA	31
     82  1.1  deraadt #define MULLO	32
     83  1.1  deraadt #define MULHI	33
     84  1.1  deraadt #define	PC	34
     85  1.1  deraadt #define	SR	35
     86  1.1  deraadt #define	PS	35	/* alias for SR */
     87  1.1  deraadt #define	F0	36
     88  1.1  deraadt #define	F1	37
     89  1.1  deraadt #define	F2	38
     90  1.1  deraadt #define	F3	39
     91  1.1  deraadt #define	F4	40
     92  1.1  deraadt #define	F5	41
     93  1.1  deraadt #define	F6	42
     94  1.1  deraadt #define	F7	43
     95  1.1  deraadt #define	F8	44
     96  1.1  deraadt #define	F9	45
     97  1.1  deraadt #define	F10	46
     98  1.1  deraadt #define	F11	47
     99  1.1  deraadt #define	F12	48
    100  1.1  deraadt #define	F13	49
    101  1.1  deraadt #define	F14	50
    102  1.1  deraadt #define	F15	51
    103  1.1  deraadt #define	F16	52
    104  1.1  deraadt #define	F17	53
    105  1.1  deraadt #define	F18	54
    106  1.1  deraadt #define	F19	55
    107  1.1  deraadt #define	F20	56
    108  1.1  deraadt #define	F21	57
    109  1.1  deraadt #define	F22	58
    110  1.1  deraadt #define	F23	59
    111  1.1  deraadt #define	F24	60
    112  1.1  deraadt #define	F25	61
    113  1.1  deraadt #define	F26	62
    114  1.1  deraadt #define	F27	63
    115  1.1  deraadt #define	F28	64
    116  1.1  deraadt #define	F29	65
    117  1.1  deraadt #define	F30	66
    118  1.1  deraadt #define	F31	67
    119  1.1  deraadt #define	FSR	68
    120  1.1  deraadt 
    121  1.1  deraadt #ifdef IPCREG
    122  1.1  deraadt #define	NIPCREG 69
    123  1.1  deraadt int ipcreg[NIPCREG] = {
    124  1.1  deraadt 	ZERO, AST, V0, V1, A0, A1, A2, A3, T0, T1, T2, T3, T4, T5, T6, T7,
    125  1.1  deraadt 	S0, S1, S2, S3, S4, S5, S6, S7, T8, T9, K0, K1, GP, SP, S8, RA,
    126  1.1  deraadt 	MULLO, MULHI, PC,
    127  1.1  deraadt 	F0, F1, F2, F3, F4, F5, F6, F7,
    128  1.1  deraadt 	F8, F9, F10, F11, F12, F13, F14, F15,
    129  1.1  deraadt 	F16, F17, F18, F19, F20, F21, F22, F23,
    130  1.1  deraadt 	F24, F25, F26, F27, F28, F29, F30, F31, FSR,
    131  1.1  deraadt };
    132  1.1  deraadt #endif
    133  1.2    glass 
    134  1.2    glass #ifdef LANGUAGE_C
    135  1.2    glass /*
    136  1.2    glass  * Register set accessible via /proc/$pid/reg
    137  1.2    glass  */
    138  1.2    glass struct reg {
    139  1.2    glass         int     r_regs[69];	/* numbered as above */
    140  1.2    glass };
    141  1.2    glass #endif /* LANGUAGE_C */
    142