reg.h revision 1.4
11.4Scgd/*	$NetBSD: reg.h,v 1.4 1994/10/26 21:09:57 cgd Exp $	*/
21.4Scgd
31.1Sderaadt/*
41.1Sderaadt * Copyright (c) 1988 University of Utah.
51.2Sglass * Copyright (c) 1992, 1993
61.2Sglass *	The Regents of the University of California.  All rights reserved.
71.1Sderaadt *
81.1Sderaadt * This code is derived from software contributed to Berkeley by
91.1Sderaadt * the Systems Programming Group of the University of Utah Computer
101.1Sderaadt * Science Department and Ralph Campbell.
111.1Sderaadt *
121.1Sderaadt * Redistribution and use in source and binary forms, with or without
131.1Sderaadt * modification, are permitted provided that the following conditions
141.1Sderaadt * are met:
151.1Sderaadt * 1. Redistributions of source code must retain the above copyright
161.1Sderaadt *    notice, this list of conditions and the following disclaimer.
171.1Sderaadt * 2. Redistributions in binary form must reproduce the above copyright
181.1Sderaadt *    notice, this list of conditions and the following disclaimer in the
191.1Sderaadt *    documentation and/or other materials provided with the distribution.
201.1Sderaadt * 3. All advertising materials mentioning features or use of this software
211.1Sderaadt *    must display the following acknowledgement:
221.1Sderaadt *	This product includes software developed by the University of
231.1Sderaadt *	California, Berkeley and its contributors.
241.1Sderaadt * 4. Neither the name of the University nor the names of its contributors
251.1Sderaadt *    may be used to endorse or promote products derived from this software
261.1Sderaadt *    without specific prior written permission.
271.1Sderaadt *
281.1Sderaadt * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
291.1Sderaadt * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
301.1Sderaadt * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
311.1Sderaadt * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
321.1Sderaadt * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
331.1Sderaadt * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
341.1Sderaadt * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
351.1Sderaadt * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
361.1Sderaadt * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
371.1Sderaadt * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
381.1Sderaadt * SUCH DAMAGE.
391.1Sderaadt *
401.1Sderaadt * from: Utah Hdr: reg.h 1.1 90/07/09
411.2Sglass *
421.4Scgd *	@(#)reg.h	8.2 (Berkeley) 1/11/94
431.1Sderaadt */
441.1Sderaadt
451.1Sderaadt/*
461.1Sderaadt * Location of the users' stored
471.1Sderaadt * registers relative to ZERO.
481.1Sderaadt * Usage is p->p_regs[XX].
491.1Sderaadt */
501.1Sderaadt#define ZERO	0
511.1Sderaadt#define AST	1
521.1Sderaadt#define V0	2
531.1Sderaadt#define V1	3
541.1Sderaadt#define A0	4
551.1Sderaadt#define A1	5
561.1Sderaadt#define A2	6
571.1Sderaadt#define A3	7
581.1Sderaadt#define T0	8
591.1Sderaadt#define T1	9
601.1Sderaadt#define T2	10
611.1Sderaadt#define T3	11
621.1Sderaadt#define T4	12
631.1Sderaadt#define T5	13
641.1Sderaadt#define T6	14
651.1Sderaadt#define T7	15
661.1Sderaadt#define S0	16
671.1Sderaadt#define S1	17
681.1Sderaadt#define S2	18
691.1Sderaadt#define S3	19
701.1Sderaadt#define S4	20
711.1Sderaadt#define S5	21
721.1Sderaadt#define S6	22
731.1Sderaadt#define S7	23
741.1Sderaadt#define T8	24
751.1Sderaadt#define T9	25
761.1Sderaadt#define K0	26
771.1Sderaadt#define K1	27
781.1Sderaadt#define GP	28
791.1Sderaadt#define SP	29
801.1Sderaadt#define S8	30
811.1Sderaadt#define RA	31
821.1Sderaadt#define MULLO	32
831.1Sderaadt#define MULHI	33
841.1Sderaadt#define	PC	34
851.1Sderaadt#define	SR	35
861.1Sderaadt#define	PS	35	/* alias for SR */
871.1Sderaadt#define	F0	36
881.1Sderaadt#define	F1	37
891.1Sderaadt#define	F2	38
901.1Sderaadt#define	F3	39
911.1Sderaadt#define	F4	40
921.1Sderaadt#define	F5	41
931.1Sderaadt#define	F6	42
941.1Sderaadt#define	F7	43
951.1Sderaadt#define	F8	44
961.1Sderaadt#define	F9	45
971.1Sderaadt#define	F10	46
981.1Sderaadt#define	F11	47
991.1Sderaadt#define	F12	48
1001.1Sderaadt#define	F13	49
1011.1Sderaadt#define	F14	50
1021.1Sderaadt#define	F15	51
1031.1Sderaadt#define	F16	52
1041.1Sderaadt#define	F17	53
1051.1Sderaadt#define	F18	54
1061.1Sderaadt#define	F19	55
1071.1Sderaadt#define	F20	56
1081.1Sderaadt#define	F21	57
1091.1Sderaadt#define	F22	58
1101.1Sderaadt#define	F23	59
1111.1Sderaadt#define	F24	60
1121.1Sderaadt#define	F25	61
1131.1Sderaadt#define	F26	62
1141.1Sderaadt#define	F27	63
1151.1Sderaadt#define	F28	64
1161.1Sderaadt#define	F29	65
1171.1Sderaadt#define	F30	66
1181.1Sderaadt#define	F31	67
1191.1Sderaadt#define	FSR	68
1201.1Sderaadt
1211.1Sderaadt#ifdef IPCREG
1221.1Sderaadt#define	NIPCREG 69
1231.1Sderaadtint ipcreg[NIPCREG] = {
1241.1Sderaadt	ZERO, AST, V0, V1, A0, A1, A2, A3, T0, T1, T2, T3, T4, T5, T6, T7,
1251.1Sderaadt	S0, S1, S2, S3, S4, S5, S6, S7, T8, T9, K0, K1, GP, SP, S8, RA,
1261.1Sderaadt	MULLO, MULHI, PC,
1271.1Sderaadt	F0, F1, F2, F3, F4, F5, F6, F7,
1281.1Sderaadt	F8, F9, F10, F11, F12, F13, F14, F15,
1291.1Sderaadt	F16, F17, F18, F19, F20, F21, F22, F23,
1301.1Sderaadt	F24, F25, F26, F27, F28, F29, F30, F31, FSR,
1311.1Sderaadt};
1321.1Sderaadt#endif
1331.2Sglass
1341.2Sglass#ifdef LANGUAGE_C
1351.2Sglass/*
1361.2Sglass * Register set accessible via /proc/$pid/reg
1371.2Sglass */
1381.2Sglassstruct reg {
1391.2Sglass        int     r_regs[69];	/* numbered as above */
1401.2Sglass};
1411.2Sglass#endif /* LANGUAGE_C */
142