|
|
1.1 root 1: #ifndef lint
2: static char sccsid[] = "@(#)rodata.c 5.1 (Berkeley) 1/16/89";
3: #endif
4:
5: /*
6: * adb - machine dependent read-only data
7: */
8:
9: #include "defs.h"
10: #include <machine/reg.h>
11:
12: #define N(arr) (sizeof(arr) / sizeof(arr[0]))
13:
14: /*
15: * Registers. The offset value is an offset from u.u_ar0 if negative,
16: * or if positive, is an offset into the pcb in u.u_pcb. PCC will not
17: * let us scale the pcb offsets (grr) so instead we scale the ar0 offsets.
18: *
19: * The `address in pcb' is in the local copy of the kernel pcb, for use
20: * with kernel dumps.
21: *
22: * The registers are printed in the order they are listed here.
23: */
24: extern struct pcb pcb;
25: #define pcboff(field) (int)&((struct pcb *)0)->field
26: #define ar0off(off) off * 4
27: struct reglist reglist[] = {
28: /* name offset address in pcb */
29: { "p1lr", pcboff(pcb_p1lr), &pcb.pcb_p1lr },
30: { "p1br", pcboff(pcb_p1br), (int *)&pcb.pcb_p1br },
31: { "p0lr", pcboff(pcb_p0lr), &pcb.pcb_p0lr },
32: { "p0br", pcboff(pcb_p0br), (int *)&pcb.pcb_p0br },
33: { "ksp", pcboff(pcb_ksp), &pcb.pcb_ksp },
34: { "esp", pcboff(pcb_esp), &pcb.pcb_esp },
35: { "ssp", pcboff(pcb_ssp), &pcb.pcb_ssp },
36: { "psl", ar0off(PS), &pcb.pcb_psl },
37: { "pc", ar0off(PC), &pcb.pcb_pc },
38: { "usp", ar0off(SP), &pcb.pcb_usp },
39: { "fp", ar0off(FP), &pcb.pcb_fp },
40: { "ap", ar0off(AP), &pcb.pcb_ap },
41: { "r11", ar0off(R11), &pcb.pcb_r11 },
42: { "r10", ar0off(R10), &pcb.pcb_r10 },
43: { "r9", ar0off(R9), &pcb.pcb_r9 },
44: { "r8", ar0off(R8), &pcb.pcb_r8 },
45: { "r7", ar0off(R7), &pcb.pcb_r7 },
46: { "r6", ar0off(R6), &pcb.pcb_r6 },
47: { "r5", ar0off(R5), &pcb.pcb_r5 },
48: { "r4", ar0off(R4), &pcb.pcb_r4 },
49: { "r3", ar0off(R3), &pcb.pcb_r3 },
50: { "r2", ar0off(R2), &pcb.pcb_r2 },
51: { "r1", ar0off(R1), &pcb.pcb_r1 },
52: { "r0", ar0off(R0), &pcb.pcb_r0 },
53: 0
54: };
55:
56: /* names for codes for illegal instruction */
57: char *illinames[] = {
58: " (reserved addressing fault)",
59: " (priviliged instruction fault)",
60: " (reserved operand fault)"
61: };
62: int nillinames = N(illinames);
63:
64: /* names for codes for floating point exception */
65: char *fpenames[] = {
66: "",
67: " (integer overflow trap)",
68: " (integer divide by zero trap)",
69: " (floating overflow trap)",
70: " (floating/decimal divide by zero trap)",
71: " (floating underflow trap)",
72: " (decimal overflow trap)",
73: " (subscript out of range trap)",
74: " (floating overflow fault)",
75: " (floating divide by zero fault)",
76: " (floating underflow fault)",
77: };
78: int nfpenames = N(fpenames);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.