Commit | Line | Data |
---|---|---|
f582ecdc | 1 | #ifndef lint |
1c15e888 | 2 | static char sccsid[] = "@(#)rodata.c 5.1 (Berkeley) 1/16/89"; |
f582ecdc KB |
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 | * The `address in pcb' is in the local copy of the kernel pcb, for use | |
19 | * with kernel dumps. | |
20 | * | |
21 | * The registers are printed in the order they are listed here. | |
22 | */ | |
23 | extern struct pcb pcb; | |
24 | #define pcboff(field) (int)&((struct pcb *)0)->field | |
25 | #define ar0off(off) off * 4 | |
26 | struct reglist reglist[] = { | |
27 | /* name offset address in pcb */ | |
28 | { "p2lr", pcboff(pcb_p2lr), &pcb.pcb_p2lr }, | |
29 | { "p2br", pcboff(pcb_p2br), (int *)&pcb.pcb_p2br }, | |
30 | { "p0lr", pcboff(pcb_p0lr), &pcb.pcb_p0lr }, | |
31 | { "p0br", pcboff(pcb_p0br), (int *)&pcb.pcb_p0br }, | |
32 | { "ksp", pcboff(pcb_ksp), &pcb.pcb_ksp }, | |
33 | #define HFS -8 /* should be in <tahoe/reg.h>! */ | |
34 | { "hfs", ar0off(HFS), &pcb.pcb_hfs }, | |
35 | { "psl", ar0off(PS), &pcb.pcb_psl }, | |
36 | { "pc", ar0off(PC), &pcb.pcb_pc }, | |
37 | { "ach", ar0off(RACH), &pcb.pcb_ach }, | |
38 | { "acl", ar0off(RACL), &pcb.pcb_acl }, | |
39 | { "usp", ar0off(SP), &pcb.pcb_usp }, | |
40 | { "fp", ar0off(FP), &pcb.pcb_fp }, | |
41 | { "r12", ar0off(R12), &pcb.pcb_r12 }, | |
42 | { "r11", ar0off(R11), &pcb.pcb_r11 }, | |
43 | { "r10", ar0off(R10), &pcb.pcb_r10 }, | |
44 | { "r9", ar0off(R9), &pcb.pcb_r9 }, | |
45 | { "r8", ar0off(R8), &pcb.pcb_r8 }, | |
46 | { "r7", ar0off(R7), &pcb.pcb_r7 }, | |
47 | { "r6", ar0off(R6), &pcb.pcb_r6 }, | |
48 | { "r5", ar0off(R5), &pcb.pcb_r5 }, | |
49 | { "r4", ar0off(R4), &pcb.pcb_r4 }, | |
50 | { "r3", ar0off(R3), &pcb.pcb_r3 }, | |
51 | { "r2", ar0off(R2), &pcb.pcb_r2 }, | |
52 | { "r1", ar0off(R1), &pcb.pcb_r1 }, | |
53 | { "r0", ar0off(R0), &pcb.pcb_r0 }, | |
54 | 0 | |
55 | }; | |
56 | ||
57 | /* names for codes for illegal instruction */ | |
58 | char *illinames[] = { | |
59 | " (reserved addressing fault)", | |
60 | " (priviliged instruction fault)", | |
61 | " (reserved operand fault)" | |
62 | }; | |
63 | int nillinames = N(illinames); | |
64 | ||
65 | /* names for codes for floating point exception */ | |
66 | char *fpenames[] = { | |
67 | "", | |
68 | " (integer overflow trap)", | |
69 | " (integer divide by zero trap)", | |
70 | /* not valid | |
71 | " (floating overflow trap)", | |
72 | " (floating/decimal divide by zero trap)", | |
73 | " (floating underflow trap)", | |
74 | " (decimal overflow trap)", | |
75 | " (subscript out of range trap)", | |
76 | " (floating overflow fault)", | |
77 | " (floating divide by zero fault)", | |
78 | " (floating underflow fault)", | |
79 | */ | |
80 | }; | |
81 | int nfpenames = N(fpenames); |