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