Commit | Line | Data |
---|---|---|
6f7a3ac3 KB |
1 | /*- |
2 | * Copyright (c) 1991 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
ad787160 C |
5 | * This module is believed to contain source code proprietary to AT&T. |
6 | * Use and redistribution is subject to the Berkeley Software License | |
7 | * Agreement and your Software Agreement with AT&T (Western Electric). | |
6f7a3ac3 KB |
8 | */ |
9 | ||
f582ecdc | 10 | #ifndef lint |
ad787160 | 11 | static char sccsid[] = "@(#)rodata.c 5.2 (Berkeley) 4/4/91"; |
6f7a3ac3 | 12 | #endif /* not lint */ |
f582ecdc KB |
13 | |
14 | /* | |
15 | * adb - machine dependent read-only data | |
16 | */ | |
17 | ||
18 | #include "defs.h" | |
19 | #include <machine/reg.h> | |
20 | ||
21 | #define N(arr) (sizeof(arr) / sizeof(arr[0])) | |
22 | ||
23 | /* | |
24 | * Registers. The offset value is an offset from u.u_ar0 if negative, | |
25 | * or if positive, is an offset into the pcb in u.u_pcb. PCC will not | |
26 | * let us scale the pcb offsets (grr) so instead we scale the ar0 offsets. | |
27 | * The `address in pcb' is in the local copy of the kernel pcb, for use | |
28 | * with kernel dumps. | |
29 | * | |
30 | * The registers are printed in the order they are listed here. | |
31 | */ | |
32 | extern struct pcb pcb; | |
33 | #define pcboff(field) (int)&((struct pcb *)0)->field | |
34 | #define ar0off(off) off * 4 | |
35 | struct reglist reglist[] = { | |
36 | /* name offset address in pcb */ | |
37 | { "p2lr", pcboff(pcb_p2lr), &pcb.pcb_p2lr }, | |
38 | { "p2br", pcboff(pcb_p2br), (int *)&pcb.pcb_p2br }, | |
39 | { "p0lr", pcboff(pcb_p0lr), &pcb.pcb_p0lr }, | |
40 | { "p0br", pcboff(pcb_p0br), (int *)&pcb.pcb_p0br }, | |
41 | { "ksp", pcboff(pcb_ksp), &pcb.pcb_ksp }, | |
42 | #define HFS -8 /* should be in <tahoe/reg.h>! */ | |
43 | { "hfs", ar0off(HFS), &pcb.pcb_hfs }, | |
44 | { "psl", ar0off(PS), &pcb.pcb_psl }, | |
45 | { "pc", ar0off(PC), &pcb.pcb_pc }, | |
46 | { "ach", ar0off(RACH), &pcb.pcb_ach }, | |
47 | { "acl", ar0off(RACL), &pcb.pcb_acl }, | |
48 | { "usp", ar0off(SP), &pcb.pcb_usp }, | |
49 | { "fp", ar0off(FP), &pcb.pcb_fp }, | |
50 | { "r12", ar0off(R12), &pcb.pcb_r12 }, | |
51 | { "r11", ar0off(R11), &pcb.pcb_r11 }, | |
52 | { "r10", ar0off(R10), &pcb.pcb_r10 }, | |
53 | { "r9", ar0off(R9), &pcb.pcb_r9 }, | |
54 | { "r8", ar0off(R8), &pcb.pcb_r8 }, | |
55 | { "r7", ar0off(R7), &pcb.pcb_r7 }, | |
56 | { "r6", ar0off(R6), &pcb.pcb_r6 }, | |
57 | { "r5", ar0off(R5), &pcb.pcb_r5 }, | |
58 | { "r4", ar0off(R4), &pcb.pcb_r4 }, | |
59 | { "r3", ar0off(R3), &pcb.pcb_r3 }, | |
60 | { "r2", ar0off(R2), &pcb.pcb_r2 }, | |
61 | { "r1", ar0off(R1), &pcb.pcb_r1 }, | |
62 | { "r0", ar0off(R0), &pcb.pcb_r0 }, | |
63 | 0 | |
64 | }; | |
65 | ||
66 | /* names for codes for illegal instruction */ | |
67 | char *illinames[] = { | |
68 | " (reserved addressing fault)", | |
69 | " (priviliged instruction fault)", | |
70 | " (reserved operand fault)" | |
71 | }; | |
72 | int nillinames = N(illinames); | |
73 | ||
74 | /* names for codes for floating point exception */ | |
75 | char *fpenames[] = { | |
76 | "", | |
77 | " (integer overflow trap)", | |
78 | " (integer divide by zero trap)", | |
79 | /* not valid | |
80 | " (floating overflow trap)", | |
81 | " (floating/decimal divide by zero trap)", | |
82 | " (floating underflow trap)", | |
83 | " (decimal overflow trap)", | |
84 | " (subscript out of range trap)", | |
85 | " (floating overflow fault)", | |
86 | " (floating divide by zero fault)", | |
87 | " (floating underflow fault)", | |
88 | */ | |
89 | }; | |
90 | int nfpenames = N(fpenames); |