1*55125Storek /* 2*55125Storek * Copyright (c) 1992 The Regents of the University of California. 3*55125Storek * All rights reserved. 4*55125Storek * 5*55125Storek * This software was developed by the Computer Systems Engineering group 6*55125Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7*55125Storek * contributed to Berkeley. 8*55125Storek * 9*55125Storek * %sccs.include.redist.c% 10*55125Storek * 11*55125Storek * @(#)reg.h 7.1 (Berkeley) 07/13/92 12*55125Storek * 13*55125Storek * from: $Header: reg.h,v 1.7 92/06/17 06:10:26 torek Exp $ 14*55125Storek */ 15*55125Storek 16*55125Storek #ifndef _MACHINE_REG_H_ 17*55125Storek #define _MACHINE_REG_H_ 18*55125Storek 19*55125Storek /* 20*55125Storek * Registers passed to trap/syscall/etc. 21*55125Storek * This structure is known to occupy exactly 80 bytes (see locore.s). 22*55125Storek * Note, tf_global[0] is not actually written (since g0 is always 0). 23*55125Storek * (The slot tf_global[0] is used to send a copy of %wim to kernel gdb. 24*55125Storek * This is known as `cheating'.) 25*55125Storek */ 26*55125Storek struct trapframe { 27*55125Storek int tf_psr; /* psr */ 28*55125Storek int tf_pc; /* return pc */ 29*55125Storek int tf_npc; /* return npc */ 30*55125Storek int tf_y; /* %y register */ 31*55125Storek int tf_global[8]; /* global registers in trap's caller */ 32*55125Storek int tf_out[8]; /* output registers in trap's caller */ 33*55125Storek }; 34*55125Storek 35*55125Storek /* 36*55125Storek * Register windows. Each stack pointer (%o6 aka %sp) in each window 37*55125Storek * must ALWAYS point to some place at which it is safe to scribble on 38*55125Storek * 64 bytes. (If not, your process gets mangled.) Furthermore, each 39*55125Storek * stack pointer should be aligned on an 8-byte boundary (the kernel 40*55125Storek * as currently coded allows arbitrary alignment, but with a hefty 41*55125Storek * performance penalty). 42*55125Storek */ 43*55125Storek struct rwindow { 44*55125Storek int rw_local[8]; /* %l0..%l7 */ 45*55125Storek int rw_in[8]; /* %i0..%i7 */ 46*55125Storek }; 47*55125Storek 48*55125Storek #include "machine/fsr.h" 49*55125Storek 50*55125Storek /* 51*55125Storek * FP coprocessor registers. 52*55125Storek * 53*55125Storek * FP_QSIZE is the maximum coprocessor instruction queue depth 54*55125Storek * of any implementation on which the kernel will run. David Hough: 55*55125Storek * ``I'd suggest allowing 16 ... allowing an indeterminate variable 56*55125Storek * size would be even better''. Of course, we cannot do that; we 57*55125Storek * need to malloc these. 58*55125Storek */ 59*55125Storek #define FP_QSIZE 16 60*55125Storek 61*55125Storek struct fp_qentry { 62*55125Storek int *fq_addr; /* the instruction's address */ 63*55125Storek int fq_instr; /* the instruction itself */ 64*55125Storek }; 65*55125Storek struct fpstate { 66*55125Storek u_int fs_regs[32]; /* our view is 32 32-bit registers */ 67*55125Storek int fs_fsr; /* %fsr */ 68*55125Storek int fs_qsize; /* actual queue depth */ 69*55125Storek struct fp_qentry fs_queue[FP_QSIZE]; /* queue contents */ 70*55125Storek }; 71*55125Storek 72*55125Storek #endif /* _MACHINE_REG_H_ */ 73