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