Home | History | Annotate | Line # | Download | only in include
regnum.h revision 1.9
      1  1.9      matt /*	$NetBSD: regnum.h,v 1.9 2009/12/14 00:46:05 matt Exp $	*/
      2  1.1  jonathan 
      3  1.1  jonathan /*
      4  1.1  jonathan  * Copyright (c) 1992, 1993
      5  1.1  jonathan  *	The Regents of the University of California.  All rights reserved.
      6  1.6       agc  *
      7  1.6       agc  * This code is derived from software contributed to Berkeley by
      8  1.6       agc  * the Systems Programming Group of the University of Utah Computer
      9  1.6       agc  * Science Department and Ralph Campbell.
     10  1.6       agc  *
     11  1.6       agc  * Redistribution and use in source and binary forms, with or without
     12  1.6       agc  * modification, are permitted provided that the following conditions
     13  1.6       agc  * are met:
     14  1.6       agc  * 1. Redistributions of source code must retain the above copyright
     15  1.6       agc  *    notice, this list of conditions and the following disclaimer.
     16  1.6       agc  * 2. Redistributions in binary form must reproduce the above copyright
     17  1.6       agc  *    notice, this list of conditions and the following disclaimer in the
     18  1.6       agc  *    documentation and/or other materials provided with the distribution.
     19  1.6       agc  * 3. Neither the name of the University nor the names of its contributors
     20  1.6       agc  *    may be used to endorse or promote products derived from this software
     21  1.6       agc  *    without specific prior written permission.
     22  1.6       agc  *
     23  1.6       agc  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24  1.6       agc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  1.6       agc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  1.6       agc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27  1.6       agc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28  1.6       agc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29  1.6       agc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  1.6       agc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  1.6       agc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  1.6       agc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  1.6       agc  * SUCH DAMAGE.
     34  1.6       agc  *
     35  1.6       agc  * from: Utah Hdr: reg.h 1.1 90/07/09
     36  1.6       agc  *
     37  1.6       agc  *	@(#)reg.h	8.2 (Berkeley) 1/11/94
     38  1.6       agc  */
     39  1.6       agc /*
     40  1.6       agc  * Copyright (c) 1988 University of Utah.
     41  1.1  jonathan  *
     42  1.1  jonathan  * This code is derived from software contributed to Berkeley by
     43  1.1  jonathan  * the Systems Programming Group of the University of Utah Computer
     44  1.1  jonathan  * Science Department and Ralph Campbell.
     45  1.1  jonathan  *
     46  1.1  jonathan  * Redistribution and use in source and binary forms, with or without
     47  1.1  jonathan  * modification, are permitted provided that the following conditions
     48  1.1  jonathan  * are met:
     49  1.1  jonathan  * 1. Redistributions of source code must retain the above copyright
     50  1.1  jonathan  *    notice, this list of conditions and the following disclaimer.
     51  1.1  jonathan  * 2. Redistributions in binary form must reproduce the above copyright
     52  1.1  jonathan  *    notice, this list of conditions and the following disclaimer in the
     53  1.1  jonathan  *    documentation and/or other materials provided with the distribution.
     54  1.1  jonathan  * 3. All advertising materials mentioning features or use of this software
     55  1.1  jonathan  *    must display the following acknowledgement:
     56  1.1  jonathan  *	This product includes software developed by the University of
     57  1.1  jonathan  *	California, Berkeley and its contributors.
     58  1.1  jonathan  * 4. Neither the name of the University nor the names of its contributors
     59  1.1  jonathan  *    may be used to endorse or promote products derived from this software
     60  1.1  jonathan  *    without specific prior written permission.
     61  1.1  jonathan  *
     62  1.1  jonathan  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     63  1.1  jonathan  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     64  1.1  jonathan  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     65  1.1  jonathan  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     66  1.1  jonathan  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     67  1.1  jonathan  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     68  1.1  jonathan  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     69  1.1  jonathan  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     70  1.1  jonathan  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     71  1.1  jonathan  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     72  1.1  jonathan  * SUCH DAMAGE.
     73  1.1  jonathan  *
     74  1.1  jonathan  * from: Utah Hdr: reg.h 1.1 90/07/09
     75  1.1  jonathan  *
     76  1.1  jonathan  *	@(#)reg.h	8.2 (Berkeley) 1/11/94
     77  1.1  jonathan  */
     78  1.1  jonathan 
     79  1.1  jonathan /*
     80  1.1  jonathan  * Location of the users' stored
     81  1.1  jonathan  * registers relative to ZERO.
     82  1.1  jonathan  * Usage is p->p_regs[XX].
     83  1.1  jonathan  */
     84  1.9      matt #define _R_ZERO		0		/* hardware zero */
     85  1.9      matt #define _R_AST		1		/* caller-saved */
     86  1.9      matt #define _R_V0		2		/* caller-saved */
     87  1.9      matt #define _R_V1		3		/* caller-saved */
     88  1.9      matt #define _R_A0		4		/* caller-saved */
     89  1.9      matt #define _R_A1		5		/* caller-saved */
     90  1.9      matt #define _R_A2		6		/* caller-saved */
     91  1.9      matt #define _R_A3		7		/* caller-saved */
     92  1.4   thorpej #if defined(__mips_n32) || defined(__mips_n64)
     93  1.9      matt #define _R_A4		8		/* caller-saved */
     94  1.9      matt #define _R_A5		9		/* caller-saved */
     95  1.9      matt #define _R_A6		10		/* caller-saved */
     96  1.9      matt #define _R_A7		11		/* caller-saved */
     97  1.9      matt #define _R_T0		12		/* caller-saved */
     98  1.9      matt #define _R_T1		13		/* caller-saved */
     99  1.9      matt #define _R_T2		14		/* caller-saved */
    100  1.9      matt #define _R_T3		15		/* caller-saved */
    101  1.4   thorpej #else
    102  1.9      matt #define _R_T0		8		/* caller-saved */
    103  1.9      matt #define _R_T1		9		/* caller-saved */
    104  1.9      matt #define _R_T2		10		/* caller-saved */
    105  1.9      matt #define _R_T3		11		/* caller-saved */
    106  1.9      matt #define _R_T4		12		/* caller-saved */
    107  1.9      matt #define _R_T5		13		/* caller-saved */
    108  1.9      matt #define _R_T6		14		/* caller-saved */
    109  1.9      matt #define _R_T7		15		/* caller-saved */
    110  1.4   thorpej #endif /* __mips_n32 || __mips_n64 */
    111  1.9      matt #define _R_S0		16		/* CALLEE-saved */
    112  1.9      matt #define _R_S1		17		/* CALLEE-saved */
    113  1.9      matt #define _R_S2		18		/* CALLEE-saved */
    114  1.9      matt #define _R_S3		19		/* CALLEE-saved */
    115  1.9      matt #define _R_S4		20		/* CALLEE-saved */
    116  1.9      matt #define _R_S5		21		/* CALLEE-saved */
    117  1.9      matt #define _R_S6		22		/* CALLEE-saved */
    118  1.9      matt #define _R_S7		23		/* CALLEE-saved */
    119  1.9      matt #define _R_T8		24		/* caller-saved */
    120  1.9      matt #define _R_T9		25		/* caller-saved */
    121  1.9      matt #define _R_K0		26		/* kernel reserved */
    122  1.9      matt #define _R_K1		27		/* kernel reserved */
    123  1.9      matt #define _R_GP		28		/* CALLEE-saved */
    124  1.9      matt #define _R_SP		29		/* CALLEE-saved */
    125  1.9      matt #define _R_S8		30		/* CALLEE-saved */
    126  1.9      matt #define _R_RA		31		/* caller-saved */
    127  1.7        he #define	_R_SR		32
    128  1.7        he #define	_R_PS		_R_SR	/* alias for SR */
    129  1.5   thorpej 
    130  1.5   thorpej /* See <mips/regdef.h> for an explanation. */
    131  1.5   thorpej #if defined(__mips_n32) || defined(__mips_n64)
    132  1.7        he #define	_R_TA0		8
    133  1.7        he #define	_R_TA1		9
    134  1.7        he #define	_R_TA2		10
    135  1.7        he #define	_R_TA3		11
    136  1.5   thorpej #else
    137  1.7        he #define	_R_TA0		12
    138  1.7        he #define	_R_TA1		13
    139  1.7        he #define	_R_TA2		14
    140  1.7        he #define	_R_TA3		15
    141  1.5   thorpej #endif /* __mips_n32 || __mips_n64 */
    142  1.3  jonathan 
    143  1.7        he #define _R_MULLO	33
    144  1.7        he #define _R_MULHI	34
    145  1.7        he #define _R_BADVADDR	35
    146  1.7        he #define _R_CAUSE	36
    147  1.7        he #define	_R_PC		37
    148  1.1  jonathan 
    149  1.7        he #define _FPBASE	38
    150  1.7        he #define _R_F0		(_FPBASE+0)
    151  1.7        he #define _R_F1		(_FPBASE+1)
    152  1.7        he #define _R_F2		(_FPBASE+2)
    153  1.7        he #define _R_F3		(_FPBASE+3)
    154  1.7        he #define _R_F4		(_FPBASE+4)
    155  1.7        he #define _R_F5		(_FPBASE+5)
    156  1.7        he #define _R_F6		(_FPBASE+6)
    157  1.7        he #define _R_F7		(_FPBASE+7)
    158  1.7        he #define _R_F8		(_FPBASE+8)
    159  1.7        he #define _R_F9		(_FPBASE+9)
    160  1.7        he #define _R_F10		(_FPBASE+10)
    161  1.7        he #define _R_F11		(_FPBASE+11)
    162  1.7        he #define _R_F12		(_FPBASE+12)
    163  1.7        he #define _R_F13		(_FPBASE+13)
    164  1.7        he #define _R_F14		(_FPBASE+14)
    165  1.7        he #define _R_F15		(_FPBASE+15)
    166  1.7        he #define _R_F16		(_FPBASE+16)
    167  1.7        he #define _R_F17		(_FPBASE+17)
    168  1.7        he #define _R_F18		(_FPBASE+18)
    169  1.7        he #define _R_F19		(_FPBASE+19)
    170  1.7        he #define _R_F20		(_FPBASE+20)
    171  1.7        he #define _R_F21		(_FPBASE+21)
    172  1.7        he #define _R_F22		(_FPBASE+22)
    173  1.7        he #define _R_F23		(_FPBASE+23)
    174  1.7        he #define _R_F24		(_FPBASE+24)
    175  1.7        he #define _R_F25		(_FPBASE+25)
    176  1.7        he #define _R_F26		(_FPBASE+26)
    177  1.7        he #define _R_F27		(_FPBASE+27)
    178  1.7        he #define _R_F28		(_FPBASE+28)
    179  1.7        he #define _R_F29		(_FPBASE+29)
    180  1.7        he #define _R_F30		(_FPBASE+30)
    181  1.7        he #define _R_F31		(_FPBASE+31)
    182  1.7        he #define	_R_FSR		(_FPBASE+32)
    183