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