xref: /csrg-svn/old/adb/adb.vax/rodata.c (revision 47821)
1*47821Sbostic /*-
2*47821Sbostic  * Copyright (c) 1991 The Regents of the University of California.
3*47821Sbostic  * All rights reserved.
4*47821Sbostic  *
5*47821Sbostic  * %sccs.include.proprietary.c%
6*47821Sbostic  */
7*47821Sbostic 
836565Sbostic #ifndef lint
9*47821Sbostic static char sccsid[] = "@(#)rodata.c	5.2 (Berkeley) 04/04/91";
10*47821Sbostic #endif /* not lint */
1136565Sbostic 
1236565Sbostic /*
1336565Sbostic  * adb - machine dependent read-only data
1436565Sbostic  */
1536565Sbostic 
1636565Sbostic #include "defs.h"
1736565Sbostic #include <machine/reg.h>
1836565Sbostic 
1936565Sbostic #define	N(arr)	(sizeof(arr) / sizeof(arr[0]))
2036565Sbostic 
2136565Sbostic /*
2236565Sbostic  * Registers.  The offset value is an offset from u.u_ar0 if negative,
2336565Sbostic  * or if positive, is an offset into the pcb in u.u_pcb.  PCC will not
2436565Sbostic  * let us scale the pcb offsets (grr) so instead we scale the ar0 offsets.
2536565Sbostic  *
2636565Sbostic  * The `address in pcb' is in the local copy of the kernel pcb, for use
2736565Sbostic  * with kernel dumps.
2836565Sbostic  *
2936565Sbostic  * The registers are printed in the order they are listed here.
3036565Sbostic  */
3136565Sbostic extern struct pcb pcb;
3236565Sbostic #define	pcboff(field)	(int)&((struct pcb *)0)->field
3336565Sbostic #define	ar0off(off)	off * 4
3436565Sbostic struct reglist reglist[] = {
3536565Sbostic 	/* name		offset			address in pcb */
3636565Sbostic 	{ "p1lr",	pcboff(pcb_p1lr),	&pcb.pcb_p1lr },
3736565Sbostic 	{ "p1br",	pcboff(pcb_p1br),	(int *)&pcb.pcb_p1br },
3836565Sbostic 	{ "p0lr",	pcboff(pcb_p0lr),	&pcb.pcb_p0lr },
3936565Sbostic 	{ "p0br",	pcboff(pcb_p0br),	(int *)&pcb.pcb_p0br },
4036565Sbostic 	{ "ksp",	pcboff(pcb_ksp),	&pcb.pcb_ksp },
4136565Sbostic 	{ "esp",	pcboff(pcb_esp),	&pcb.pcb_esp },
4236565Sbostic 	{ "ssp",	pcboff(pcb_ssp),	&pcb.pcb_ssp },
4336565Sbostic 	{ "psl",	ar0off(PS),		&pcb.pcb_psl },
4436565Sbostic 	{ "pc",		ar0off(PC),		&pcb.pcb_pc },
4536565Sbostic 	{ "usp",	ar0off(SP),		&pcb.pcb_usp },
4636565Sbostic 	{ "fp",		ar0off(FP),		&pcb.pcb_fp },
4736565Sbostic 	{ "ap",		ar0off(AP),		&pcb.pcb_ap },
4836565Sbostic 	{ "r11",	ar0off(R11),		&pcb.pcb_r11 },
4936565Sbostic 	{ "r10",	ar0off(R10),		&pcb.pcb_r10 },
5036565Sbostic 	{ "r9",		ar0off(R9),		&pcb.pcb_r9 },
5136565Sbostic 	{ "r8",		ar0off(R8),		&pcb.pcb_r8 },
5236565Sbostic 	{ "r7",		ar0off(R7),		&pcb.pcb_r7 },
5336565Sbostic 	{ "r6",		ar0off(R6),		&pcb.pcb_r6 },
5436565Sbostic 	{ "r5",		ar0off(R5),		&pcb.pcb_r5 },
5536565Sbostic 	{ "r4",		ar0off(R4),		&pcb.pcb_r4 },
5636565Sbostic 	{ "r3",		ar0off(R3),		&pcb.pcb_r3 },
5736565Sbostic 	{ "r2",		ar0off(R2),		&pcb.pcb_r2 },
5836565Sbostic 	{ "r1",		ar0off(R1),		&pcb.pcb_r1 },
5936565Sbostic 	{ "r0",		ar0off(R0),		&pcb.pcb_r0 },
6036565Sbostic 	0
6136565Sbostic };
6236565Sbostic 
6336565Sbostic /* names for codes for illegal instruction */
6436565Sbostic char	*illinames[] = {
6536565Sbostic 	" (reserved addressing fault)",
6636565Sbostic 	" (priviliged instruction fault)",
6736565Sbostic 	" (reserved operand fault)"
6836565Sbostic };
6936565Sbostic int	nillinames = N(illinames);
7036565Sbostic 
7136565Sbostic /* names for codes for floating point exception */
7236565Sbostic char	*fpenames[] = {
7336565Sbostic 	"",
7436565Sbostic 	" (integer overflow trap)",
7536565Sbostic 	" (integer divide by zero trap)",
7636565Sbostic 	" (floating overflow trap)",
7736565Sbostic 	" (floating/decimal divide by zero trap)",
7836565Sbostic 	" (floating underflow trap)",
7936565Sbostic 	" (decimal overflow trap)",
8036565Sbostic 	" (subscript out of range trap)",
8136565Sbostic 	" (floating overflow fault)",
8236565Sbostic 	" (floating divide by zero fault)",
8336565Sbostic 	" (floating underflow fault)",
8436565Sbostic };
8536565Sbostic int	nfpenames = N(fpenames);
86