xref: /csrg-svn/sys/hp300/include/reg.h (revision 65365)
141474Smckusick /*
241474Smckusick  * Copyright (c) 1988 University of Utah.
363160Sbostic  * Copyright (c) 1982, 1986, 1990, 1993
463160Sbostic  *	The Regents of the University of California.  All rights reserved.
541474Smckusick  *
641474Smckusick  * This code is derived from software contributed to Berkeley by
741474Smckusick  * the Systems Programming Group of the University of Utah Computer
841474Smckusick  * Science Department.
941474Smckusick  *
1041474Smckusick  * %sccs.include.redist.c%
1141474Smckusick  *
1245473Smckusick  * from: Utah $Hdr: reg.h 1.1 90/07/09$
1341474Smckusick  *
14*65365Spendry  *	@(#)reg.h	8.2 (Berkeley) 01/03/94
1541474Smckusick  */
1641474Smckusick 
1741474Smckusick /*
1841474Smckusick  * Location of the users' stored
1941474Smckusick  * registers relative to D0.
2041474Smckusick  * Usage is u.u_ar0[XX].
2141474Smckusick  */
2241474Smckusick #define	D0	(0)
2341474Smckusick #define	D1	(1)
2441474Smckusick #define	D2	(2)
2541474Smckusick #define	D3	(3)
2641474Smckusick #define	D4	(4)
2741474Smckusick #define	D5	(5)
2841474Smckusick #define	D6	(6)
2941474Smckusick #define	D7	(7)
3041474Smckusick #define	A0	(8)
3141474Smckusick #define	A1	(9)
3241474Smckusick #define	A2	(10)
3341474Smckusick #define	A3	(11)
3441474Smckusick #define	A4	(12)
3541474Smckusick #define	A5	(13)
3641474Smckusick #define	A6	(14)
3741474Smckusick #define	A7	(15)
3841474Smckusick 
3941474Smckusick #define	SP	A7
4041474Smckusick #define	PC	(17)
4141474Smckusick #define	PS	(16)
4241474Smckusick 
4341474Smckusick #ifdef IPCREG
4457324Shibler #define	NIPCREG 16
4541474Smckusick int ipcreg[NIPCREG] =
4657324Shibler 	{D0,D1,D2,D3,D4,D5,D6,D7,A0,A1,A2,A3,A4,A5,A6,A7};
4741474Smckusick #endif
4841474Smckusick 
49*65365Spendry /*
50*65365Spendry  * Register set accessible via /proc/$pid/reg
51*65365Spendry  */
52*65365Spendry struct reg {
53*65365Spendry         int     r_regs[16];	/* numbered as above */
54*65365Spendry 	int	r_pc;
55*65365Spendry 	int	r_sr;
56*65365Spendry };
57*65365Spendry 
58*65365Spendry 
5941474Smckusick #ifdef KERNEL
6041474Smckusick /*
6141474Smckusick  * Due to a mental lapse somewhere down the line, wait returns its values
6241474Smckusick  * in strange registers.  Kludge it up here so we don't have to in the
6341474Smckusick  * machine-independent code.
6441474Smckusick  */
6541474Smckusick #define	R0	D1
6641474Smckusick #define	R1	A0
6741474Smckusick #endif
68