xref: /original-bsd/sys/hp300/include/reg.h (revision 75c3352c)
16a142993Smckusick /*
26a142993Smckusick  * Copyright (c) 1988 University of Utah.
3a2ef35f5Sbostic  * Copyright (c) 1982, 1986, 1990, 1993
4a2ef35f5Sbostic  *	The Regents of the University of California.  All rights reserved.
56a142993Smckusick  *
66a142993Smckusick  * This code is derived from software contributed to Berkeley by
76a142993Smckusick  * the Systems Programming Group of the University of Utah Computer
86a142993Smckusick  * Science Department.
96a142993Smckusick  *
106a142993Smckusick  * %sccs.include.redist.c%
116a142993Smckusick  *
12c7c7c498Smckusick  * from: Utah $Hdr: reg.h 1.1 90/07/09$
136a142993Smckusick  *
14*75c3352cSpendry  *	@(#)reg.h	8.3 (Berkeley) 01/27/94
156a142993Smckusick  */
166a142993Smckusick 
176a142993Smckusick /*
186a142993Smckusick  * Location of the users' stored
196a142993Smckusick  * registers relative to D0.
206a142993Smckusick  * Usage is u.u_ar0[XX].
216a142993Smckusick  */
226a142993Smckusick #define	D0	(0)
236a142993Smckusick #define	D1	(1)
246a142993Smckusick #define	D2	(2)
256a142993Smckusick #define	D3	(3)
266a142993Smckusick #define	D4	(4)
276a142993Smckusick #define	D5	(5)
286a142993Smckusick #define	D6	(6)
296a142993Smckusick #define	D7	(7)
306a142993Smckusick #define	A0	(8)
316a142993Smckusick #define	A1	(9)
326a142993Smckusick #define	A2	(10)
336a142993Smckusick #define	A3	(11)
346a142993Smckusick #define	A4	(12)
356a142993Smckusick #define	A5	(13)
366a142993Smckusick #define	A6	(14)
376a142993Smckusick #define	A7	(15)
386a142993Smckusick 
396a142993Smckusick #define	SP	A7
406a142993Smckusick #define	PC	(17)
416a142993Smckusick #define	PS	(16)
426a142993Smckusick 
436a142993Smckusick #ifdef IPCREG
44040c7c85Shibler #define	NIPCREG 16
456a142993Smckusick int ipcreg[NIPCREG] =
46040c7c85Shibler 	{D0,D1,D2,D3,D4,D5,D6,D7,A0,A1,A2,A3,A4,A5,A6,A7};
476a142993Smckusick #endif
486a142993Smckusick 
49fa81e75fSpendry /*
50fa81e75fSpendry  * Register set accessible via /proc/$pid/reg
51fa81e75fSpendry  */
52fa81e75fSpendry struct reg {
53fa81e75fSpendry         int     r_regs[16];	/* numbered as above */
54fa81e75fSpendry 	int	r_pc;
55fa81e75fSpendry 	int	r_sr;
56fa81e75fSpendry };
57fa81e75fSpendry 
58*75c3352cSpendry /*
59*75c3352cSpendry  * Register set accessible via /proc/$pid/fpreg
60*75c3352cSpendry  */
61*75c3352cSpendry struct fpreg {
62*75c3352cSpendry 	int	fpr_xxx;	/* not implemented */
63*75c3352cSpendry };
64*75c3352cSpendry 
65fa81e75fSpendry 
666a142993Smckusick #ifdef KERNEL
676a142993Smckusick /*
686a142993Smckusick  * Due to a mental lapse somewhere down the line, wait returns its values
696a142993Smckusick  * in strange registers.  Kludge it up here so we don't have to in the
706a142993Smckusick  * machine-independent code.
716a142993Smckusick  */
726a142993Smckusick #define	R0	D1
736a142993Smckusick #define	R1	A0
746a142993Smckusick #endif
75