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