xref: /original-bsd/sys/hp300/include/reg.h (revision f737e041)
1 /*
2  * Copyright (c) 1988 University of Utah.
3  * Copyright (c) 1982, 1986, 1990, 1993
4  *	The Regents of the University of California.  All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * the Systems Programming Group of the University of Utah Computer
8  * Science Department.
9  *
10  * %sccs.include.redist.c%
11  *
12  * from: Utah $Hdr: reg.h 1.1 90/07/09$
13  *
14  *	@(#)reg.h	8.3 (Berkeley) 01/27/94
15  */
16 
17 /*
18  * Location of the users' stored
19  * registers relative to D0.
20  * Usage is u.u_ar0[XX].
21  */
22 #define	D0	(0)
23 #define	D1	(1)
24 #define	D2	(2)
25 #define	D3	(3)
26 #define	D4	(4)
27 #define	D5	(5)
28 #define	D6	(6)
29 #define	D7	(7)
30 #define	A0	(8)
31 #define	A1	(9)
32 #define	A2	(10)
33 #define	A3	(11)
34 #define	A4	(12)
35 #define	A5	(13)
36 #define	A6	(14)
37 #define	A7	(15)
38 
39 #define	SP	A7
40 #define	PC	(17)
41 #define	PS	(16)
42 
43 #ifdef IPCREG
44 #define	NIPCREG 16
45 int ipcreg[NIPCREG] =
46 	{D0,D1,D2,D3,D4,D5,D6,D7,A0,A1,A2,A3,A4,A5,A6,A7};
47 #endif
48 
49 /*
50  * Register set accessible via /proc/$pid/reg
51  */
52 struct reg {
53         int     r_regs[16];	/* numbered as above */
54 	int	r_pc;
55 	int	r_sr;
56 };
57 
58 /*
59  * Register set accessible via /proc/$pid/fpreg
60  */
61 struct fpreg {
62 	int	fpr_xxx;	/* not implemented */
63 };
64 
65 
66 #ifdef KERNEL
67 /*
68  * Due to a mental lapse somewhere down the line, wait returns its values
69  * in strange registers.  Kludge it up here so we don't have to in the
70  * machine-independent code.
71  */
72 #define	R0	D1
73 #define	R1	A0
74 #endif
75