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