155125Storek /* 2*63320Sbostic * Copyright (c) 1992, 1993 3*63320Sbostic * The Regents of the University of California. All rights reserved. 455125Storek * 555125Storek * This software was developed by the Computer Systems Engineering group 655125Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 755125Storek * contributed to Berkeley. 855125Storek * 955501Sbostic * All advertising materials mentioning features or use of this software 1055501Sbostic * must display the following acknowledgement: 1155501Sbostic * This product includes software developed by the University of 1259210Storek * California, Lawrence Berkeley Laboratory. 1355501Sbostic * 1455125Storek * %sccs.include.redist.c% 1555125Storek * 16*63320Sbostic * @(#)reg.h 8.1 (Berkeley) 06/11/93 1755125Storek * 1859210Storek * from: $Header: reg.h,v 1.8 92/11/26 02:04:44 torek Exp $ 1955125Storek */ 2055125Storek 2155125Storek #ifndef _MACHINE_REG_H_ 2255125Storek #define _MACHINE_REG_H_ 2355125Storek 2455125Storek /* 2555125Storek * Registers passed to trap/syscall/etc. 2655125Storek * This structure is known to occupy exactly 80 bytes (see locore.s). 2755125Storek * Note, tf_global[0] is not actually written (since g0 is always 0). 2855125Storek * (The slot tf_global[0] is used to send a copy of %wim to kernel gdb. 2955125Storek * This is known as `cheating'.) 3055125Storek */ 3155125Storek struct trapframe { 3255125Storek int tf_psr; /* psr */ 3355125Storek int tf_pc; /* return pc */ 3455125Storek int tf_npc; /* return npc */ 3555125Storek int tf_y; /* %y register */ 3655125Storek int tf_global[8]; /* global registers in trap's caller */ 3755125Storek int tf_out[8]; /* output registers in trap's caller */ 3855125Storek }; 3955125Storek 4055125Storek /* 4155125Storek * Register windows. Each stack pointer (%o6 aka %sp) in each window 4255125Storek * must ALWAYS point to some place at which it is safe to scribble on 4355125Storek * 64 bytes. (If not, your process gets mangled.) Furthermore, each 4455125Storek * stack pointer should be aligned on an 8-byte boundary (the kernel 4555125Storek * as currently coded allows arbitrary alignment, but with a hefty 4655125Storek * performance penalty). 4755125Storek */ 4855125Storek struct rwindow { 4955125Storek int rw_local[8]; /* %l0..%l7 */ 5055125Storek int rw_in[8]; /* %i0..%i7 */ 5155125Storek }; 5255125Storek 5356538Sbostic #include <machine/fsr.h> 5455125Storek 5555125Storek /* 5655125Storek * FP coprocessor registers. 5755125Storek * 5855125Storek * FP_QSIZE is the maximum coprocessor instruction queue depth 5955125Storek * of any implementation on which the kernel will run. David Hough: 6055125Storek * ``I'd suggest allowing 16 ... allowing an indeterminate variable 6155125Storek * size would be even better''. Of course, we cannot do that; we 6255125Storek * need to malloc these. 6355125Storek */ 6455125Storek #define FP_QSIZE 16 6555125Storek 6655125Storek struct fp_qentry { 6755125Storek int *fq_addr; /* the instruction's address */ 6855125Storek int fq_instr; /* the instruction itself */ 6955125Storek }; 7055125Storek struct fpstate { 7155125Storek u_int fs_regs[32]; /* our view is 32 32-bit registers */ 7255125Storek int fs_fsr; /* %fsr */ 7355125Storek int fs_qsize; /* actual queue depth */ 7455125Storek struct fp_qentry fs_queue[FP_QSIZE]; /* queue contents */ 7555125Storek }; 7655125Storek 7755125Storek #endif /* _MACHINE_REG_H_ */ 78