1*47819Sbostic /*- 2*47819Sbostic * Copyright (c) 1991 The Regents of the University of California. 3*47819Sbostic * All rights reserved. 4*47819Sbostic * 5*47819Sbostic * %sccs.include.proprietary.c% 6*47819Sbostic */ 7*47819Sbostic 836560Sbostic #ifndef lint 9*47819Sbostic static char sccsid[] = "@(#)rodata.c 5.2 (Berkeley) 04/04/91"; 10*47819Sbostic #endif /* not lint */ 1136560Sbostic 1236560Sbostic /* 1336560Sbostic * adb - machine dependent read-only data 1436560Sbostic */ 1536560Sbostic 1636560Sbostic #include "defs.h" 1736560Sbostic #include <machine/reg.h> 1836560Sbostic 1936560Sbostic #define N(arr) (sizeof(arr) / sizeof(arr[0])) 2036560Sbostic 2136560Sbostic /* 2236560Sbostic * Registers. The offset value is an offset from u.u_ar0 if negative, 2336560Sbostic * or if positive, is an offset into the pcb in u.u_pcb. PCC will not 2436560Sbostic * let us scale the pcb offsets (grr) so instead we scale the ar0 offsets. 2536560Sbostic * The `address in pcb' is in the local copy of the kernel pcb, for use 2636560Sbostic * with kernel dumps. 2736560Sbostic * 2836560Sbostic * The registers are printed in the order they are listed here. 2936560Sbostic */ 3036560Sbostic extern struct pcb pcb; 3136560Sbostic #define pcboff(field) (int)&((struct pcb *)0)->field 3236560Sbostic #define ar0off(off) off * 4 3336560Sbostic struct reglist reglist[] = { 3436560Sbostic /* name offset address in pcb */ 3536560Sbostic { "p2lr", pcboff(pcb_p2lr), &pcb.pcb_p2lr }, 3636560Sbostic { "p2br", pcboff(pcb_p2br), (int *)&pcb.pcb_p2br }, 3736560Sbostic { "p0lr", pcboff(pcb_p0lr), &pcb.pcb_p0lr }, 3836560Sbostic { "p0br", pcboff(pcb_p0br), (int *)&pcb.pcb_p0br }, 3936560Sbostic { "ksp", pcboff(pcb_ksp), &pcb.pcb_ksp }, 4036560Sbostic #define HFS -8 /* should be in <tahoe/reg.h>! */ 4136560Sbostic { "hfs", ar0off(HFS), &pcb.pcb_hfs }, 4236560Sbostic { "psl", ar0off(PS), &pcb.pcb_psl }, 4336560Sbostic { "pc", ar0off(PC), &pcb.pcb_pc }, 4436560Sbostic { "ach", ar0off(RACH), &pcb.pcb_ach }, 4536560Sbostic { "acl", ar0off(RACL), &pcb.pcb_acl }, 4636560Sbostic { "usp", ar0off(SP), &pcb.pcb_usp }, 4736560Sbostic { "fp", ar0off(FP), &pcb.pcb_fp }, 4836560Sbostic { "r12", ar0off(R12), &pcb.pcb_r12 }, 4936560Sbostic { "r11", ar0off(R11), &pcb.pcb_r11 }, 5036560Sbostic { "r10", ar0off(R10), &pcb.pcb_r10 }, 5136560Sbostic { "r9", ar0off(R9), &pcb.pcb_r9 }, 5236560Sbostic { "r8", ar0off(R8), &pcb.pcb_r8 }, 5336560Sbostic { "r7", ar0off(R7), &pcb.pcb_r7 }, 5436560Sbostic { "r6", ar0off(R6), &pcb.pcb_r6 }, 5536560Sbostic { "r5", ar0off(R5), &pcb.pcb_r5 }, 5636560Sbostic { "r4", ar0off(R4), &pcb.pcb_r4 }, 5736560Sbostic { "r3", ar0off(R3), &pcb.pcb_r3 }, 5836560Sbostic { "r2", ar0off(R2), &pcb.pcb_r2 }, 5936560Sbostic { "r1", ar0off(R1), &pcb.pcb_r1 }, 6036560Sbostic { "r0", ar0off(R0), &pcb.pcb_r0 }, 6136560Sbostic 0 6236560Sbostic }; 6336560Sbostic 6436560Sbostic /* names for codes for illegal instruction */ 6536560Sbostic char *illinames[] = { 6636560Sbostic " (reserved addressing fault)", 6736560Sbostic " (priviliged instruction fault)", 6836560Sbostic " (reserved operand fault)" 6936560Sbostic }; 7036560Sbostic int nillinames = N(illinames); 7136560Sbostic 7236560Sbostic /* names for codes for floating point exception */ 7336560Sbostic char *fpenames[] = { 7436560Sbostic "", 7536560Sbostic " (integer overflow trap)", 7636560Sbostic " (integer divide by zero trap)", 7736560Sbostic /* not valid 7836560Sbostic " (floating overflow trap)", 7936560Sbostic " (floating/decimal divide by zero trap)", 8036560Sbostic " (floating underflow trap)", 8136560Sbostic " (decimal overflow trap)", 8236560Sbostic " (subscript out of range trap)", 8336560Sbostic " (floating overflow fault)", 8436560Sbostic " (floating divide by zero fault)", 8536560Sbostic " (floating underflow fault)", 8636560Sbostic */ 8736560Sbostic }; 8836560Sbostic int nfpenames = N(fpenames); 89