1 /* $NetBSD: frame.h,v 1.2 2000/09/08 10:15:23 tsubai Exp $ */ 2 3 /*- 4 * Copyright (c) 1995 Charles M. Hannum. All rights reserved. 5 * Copyright (c) 1990 The Regents of the University of California. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by 9 * William Jolitz. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in the 18 * documentation and/or other materials provided with the distribution. 19 * 3. All advertising materials mentioning features or use of this software 20 * must display the following acknowledgement: 21 * This product includes software developed by the University of 22 * California, Berkeley and its contributors. 23 * 4. Neither the name of the University nor the names of its contributors 24 * may be used to endorse or promote products derived from this software 25 * without specific prior written permission. 26 * 27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * @(#)frame.h 5.2 (Berkeley) 1/18/91 40 */ 41 42 #ifndef _SH3_FRAME_H_ 43 #define _SH3_FRAME_H_ 44 45 #include <sys/signal.h> 46 47 /* 48 * System stack frames. 49 */ 50 51 /* 52 * Exception/Trap Stack Frame 53 */ 54 struct trapframe { 55 int tf_trapno; 56 int tf_ubc; 57 int tf_spc; 58 int tf_ssr; 59 int tf_macl; 60 int tf_mach; 61 int tf_pr; 62 int tf_r14; 63 int tf_r13; 64 int tf_r12; 65 int tf_r11; 66 int tf_r10; 67 int tf_r9; 68 int tf_r8; 69 int tf_r7; 70 int tf_r6; 71 int tf_r5; 72 int tf_r4; 73 int tf_r3; 74 int tf_r2; 75 int tf_r1; 76 int tf_r0; 77 int tf_r15; 78 }; 79 80 /* 81 * Interrupt stack frame 82 */ 83 struct intrframe { 84 int if_trapno; 85 int dummy; 86 int if_spc; 87 int if_ssr; 88 int if_macl; 89 int if_mach; 90 int if_pr; 91 int if_r14; 92 int if_r13; 93 int if_r12; 94 int if_r11; 95 int if_r10; 96 int if_r9; 97 int if_r8; 98 int if_r7; 99 int if_r6; 100 int if_r5; 101 int if_r4; 102 int if_r3; 103 int if_r2; 104 int if_r1; 105 int if_r0; 106 int if_r15; 107 int if_pri; 108 }; 109 110 /* 111 * Stack frame inside cpu_switch() 112 */ 113 struct switchframe { 114 int sf_ppl; 115 int sf_r14; 116 int sf_r13; 117 int sf_r12; 118 int sf_r11; 119 int sf_r10; 120 int sf_r9; 121 int sf_r8; 122 int sf_pr; 123 }; 124 125 /* 126 * Signal frame 127 */ 128 struct sigframe { 129 int sf_signum; 130 int sf_code; 131 struct sigcontext *sf_scp; 132 sig_t sf_handler; 133 struct sigcontext sf_sc; 134 }; 135 136 #endif /* !_SH3_FRAME_H_ */ 137