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