1 /* 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1982, 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. All advertising materials mentioning features or use of this software 19 * must display the following acknowledgement: 20 * This product includes software developed by the University of 21 * California, Berkeley and its contributors. 22 * 4. Neither the name of the University nor the names of its contributors 23 * may be used to endorse or promote products derived from this software 24 * without specific prior written permission. 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * from: Utah $Hdr: frame.h 1.1 90/07/09$ 39 * 40 * @(#)frame.h 7.2 (Berkeley) 11/2/90 41 */ 42 43 struct frame { 44 int f_regs[16]; 45 short f_stackadj; 46 u_short f_sr; 47 u_int f_pc; 48 u_short f_format:4, 49 f_vector:12; 50 union F_u { 51 struct fmt2 { 52 u_int f_iaddr; 53 } F_fmt2; 54 55 struct fmt9 { 56 u_int f_iaddr; 57 u_short f_iregs[4]; 58 } F_fmt9; 59 60 struct fmtA { 61 u_short f_ir0; 62 u_short f_ssw; 63 u_short f_ipsc; 64 u_short f_ipsb; 65 u_int f_dcfa; 66 u_short f_ir1, f_ir2; 67 u_int f_dob; 68 u_short f_ir3, f_ir4; 69 } F_fmtA; 70 71 struct fmtB { 72 u_short f_ir0; 73 u_short f_ssw; 74 u_short f_ipsc; 75 u_short f_ipsb; 76 u_int f_dcfa; 77 u_short f_ir1, f_ir2; 78 u_int f_dob; 79 u_short f_ir3, f_ir4; 80 u_short f_ir5, f_ir6; 81 u_int f_sba; 82 u_short f_ir7, f_ir8; 83 u_int f_dib; 84 u_short f_iregs[22]; 85 } F_fmtB; 86 } F_u; 87 }; 88 89 #define f_fmt2 F_u.F_fmt2 90 #define f_fmtA F_u.F_fmtA 91 #define f_fmtB F_u.F_fmtB 92 93 /* common frame size */ 94 #define CFSIZE (sizeof(struct frame) - sizeof(union F_u)) 95 #define NFMTSIZE 8 96 97 #define FMT0 0x0 98 #define FMT1 0x1 99 #define FMT2 0x2 100 #define FMT9 0x9 101 #define FMTA 0xA 102 #define FMTB 0xB 103 104 /* frame specific info sizes */ 105 #define FMT0SIZE 0 106 #define FMT1SIZE 0 107 #define FMT2SIZE sizeof(struct fmt2) 108 #define FMT9SIZE sizeof(struct fmt9) 109 #define FMTASIZE sizeof(struct fmtA) 110 #define FMTBSIZE sizeof(struct fmtB) 111 112 #define V_BUSERR 0x008 113 #define V_ADDRERR 0x00C 114 #define V_TRAP1 0x084 115 116 #define SSW_RC 0x2000 117 #define SSW_RB 0x1000 118 #define SSW_DF 0x0100 119 #define SSW_RM 0x0080 120 #define SSW_RW 0x0040 121 #define SSW_FCMASK 0x0007 122 123 struct fpframe { 124 union FPF_u1 { 125 u_int FPF_null; 126 struct { 127 u_char FPF_version; 128 u_char FPF_fsize; 129 u_short FPF_res1; 130 } FPF_nonnull; 131 } FPF_u1; 132 union FPF_u2 { 133 struct fpidle { 134 u_short fpf_ccr; 135 u_short fpf_res2; 136 u_int fpf_iregs1[8]; 137 u_int fpf_xops[3]; 138 u_int fpf_opreg; 139 u_int fpf_biu; 140 } FPF_idle; 141 142 struct fpbusy { 143 u_int fpf_iregs[53]; 144 } FPF_busy; 145 } FPF_u2; 146 u_int fpf_regs[8*3]; 147 u_int fpf_fpcr; 148 u_int fpf_fpsr; 149 u_int fpf_fpiar; 150 }; 151 152 #define fpf_null FPF_u1.FPF_null 153 #define fpf_version FPF_u1.FPF_nonnull.FPF_version 154 #define fpf_fsize FPF_u1.FPF_nonnull.FPF_fsize 155 #define fpf_res1 FPF_u1.FPF_nonnull.FPF_res1 156 #define fpf_idle FPF_u2.FPF_idle 157 #define fpf_busy FPF_u2.FPF_busy 158