xref: /openbsd-src/sys/arch/sh/include/frame.h (revision 8908800ca8f0a578dfd16a11e07ae56faa1c7a29)
1*8908800cSguenther /*	$OpenBSD: frame.h,v 1.3 2016/05/18 20:21:13 guenther Exp $	*/
295c7671fSmiod /*	$NetBSD: frame.h,v 1.14 2005/12/11 12:18:58 christos Exp $	*/
395c7671fSmiod 
495c7671fSmiod /*-
595c7671fSmiod  * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
695c7671fSmiod  * Copyright (c) 1990 The Regents of the University of California.
795c7671fSmiod  * All rights reserved.
895c7671fSmiod  *
995c7671fSmiod  * This code is derived from software contributed to Berkeley by
1095c7671fSmiod  * William Jolitz.
1195c7671fSmiod  *
1295c7671fSmiod  * Redistribution and use in source and binary forms, with or without
1395c7671fSmiod  * modification, are permitted provided that the following conditions
1495c7671fSmiod  * are met:
1595c7671fSmiod  * 1. Redistributions of source code must retain the above copyright
1695c7671fSmiod  *    notice, this list of conditions and the following disclaimer.
1795c7671fSmiod  * 2. Redistributions in binary form must reproduce the above copyright
1895c7671fSmiod  *    notice, this list of conditions and the following disclaimer in the
1995c7671fSmiod  *    documentation and/or other materials provided with the distribution.
2095c7671fSmiod  * 3. Neither the name of the University nor the names of its contributors
2195c7671fSmiod  *    may be used to endorse or promote products derived from this software
2295c7671fSmiod  *    without specific prior written permission.
2395c7671fSmiod  *
2495c7671fSmiod  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2595c7671fSmiod  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2695c7671fSmiod  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2795c7671fSmiod  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2895c7671fSmiod  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2995c7671fSmiod  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3095c7671fSmiod  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3195c7671fSmiod  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3295c7671fSmiod  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3395c7671fSmiod  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3495c7671fSmiod  * SUCH DAMAGE.
3595c7671fSmiod  *
3695c7671fSmiod  *	@(#)frame.h	5.2 (Berkeley) 1/18/91
3795c7671fSmiod  */
3895c7671fSmiod 
3995c7671fSmiod /*-
4095c7671fSmiod  * Copyright (c) 1995 Charles M. Hannum.  All rights reserved.
4195c7671fSmiod  *
4295c7671fSmiod  * This code is derived from software contributed to Berkeley by
4395c7671fSmiod  * William Jolitz.
4495c7671fSmiod  *
4595c7671fSmiod  * Redistribution and use in source and binary forms, with or without
4695c7671fSmiod  * modification, are permitted provided that the following conditions
4795c7671fSmiod  * are met:
4895c7671fSmiod  * 1. Redistributions of source code must retain the above copyright
4995c7671fSmiod  *    notice, this list of conditions and the following disclaimer.
5095c7671fSmiod  * 2. Redistributions in binary form must reproduce the above copyright
5195c7671fSmiod  *    notice, this list of conditions and the following disclaimer in the
5295c7671fSmiod  *    documentation and/or other materials provided with the distribution.
5395c7671fSmiod  * 3. All advertising materials mentioning features or use of this software
5495c7671fSmiod  *    must display the following acknowledgement:
5595c7671fSmiod  *	This product includes software developed by the University of
5695c7671fSmiod  *	California, Berkeley and its contributors.
5795c7671fSmiod  * 4. Neither the name of the University nor the names of its contributors
5895c7671fSmiod  *    may be used to endorse or promote products derived from this software
5995c7671fSmiod  *    without specific prior written permission.
6095c7671fSmiod  *
6195c7671fSmiod  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
6295c7671fSmiod  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
6395c7671fSmiod  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
6495c7671fSmiod  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
6595c7671fSmiod  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
6695c7671fSmiod  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
6795c7671fSmiod  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
6895c7671fSmiod  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
6995c7671fSmiod  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7095c7671fSmiod  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7195c7671fSmiod  * SUCH DAMAGE.
7295c7671fSmiod  *
7395c7671fSmiod  *	@(#)frame.h	5.2 (Berkeley) 1/18/91
7495c7671fSmiod  */
7595c7671fSmiod 
7695c7671fSmiod #ifndef _SH_FRAME_H_
7795c7671fSmiod #define	_SH_FRAME_H_
7895c7671fSmiod 
7995c7671fSmiod #include <sys/signal.h>
8095c7671fSmiod 
8195c7671fSmiod /*
8295c7671fSmiod  * Exception Stack Frame
8395c7671fSmiod  */
8495c7671fSmiod struct trapframe {
8595c7671fSmiod 	/* software member */
8695c7671fSmiod 	int	tf_expevt;
8795c7671fSmiod 	int	tf_ubc;
8895c7671fSmiod 	/* hardware registers */
8995c7671fSmiod 	int	tf_spc;
9095c7671fSmiod 	int	tf_ssr;
91*8908800cSguenther 	int	tf_gbr;
9295c7671fSmiod 	int	tf_macl;
9395c7671fSmiod 	int	tf_mach;
9495c7671fSmiod 	int	tf_pr;
9595c7671fSmiod 	int	tf_r13;
9695c7671fSmiod 	int	tf_r12;
9795c7671fSmiod 	int	tf_r11;
9895c7671fSmiod 	int	tf_r10;
9995c7671fSmiod 	int	tf_r9;
10095c7671fSmiod 	int	tf_r8;
10195c7671fSmiod 	int	tf_r7;
10295c7671fSmiod 	int	tf_r6;
10395c7671fSmiod 	int	tf_r5;
10495c7671fSmiod 	int	tf_r4;
10595c7671fSmiod 	int	tf_r3;
10695c7671fSmiod 	int	tf_r2;
10795c7671fSmiod 	int	tf_r1;
10895c7671fSmiod 	int	tf_r0;
10995c7671fSmiod 	int	tf_r15;
11095c7671fSmiod 	int	tf_r14;
11195c7671fSmiod };
11295c7671fSmiod 
11395c7671fSmiod /*
11495c7671fSmiod  * Stack frame inside cpu_switch()
11595c7671fSmiod  */
11695c7671fSmiod struct switchframe {
11795c7671fSmiod 	int	sf_r15;
11895c7671fSmiod 	int	sf_r14;
11995c7671fSmiod 	int	sf_r13;
12095c7671fSmiod 	int	sf_r12;
12195c7671fSmiod 	int	sf_r11;
12295c7671fSmiod 	int	sf_r10;
12395c7671fSmiod 	int	sf_r9;
12495c7671fSmiod 	int	sf_r8;
12595c7671fSmiod 	int	sf_pr;
12695c7671fSmiod 	int	sf_r6_bank;
12795c7671fSmiod 	int	sf_sr;
12895c7671fSmiod 	int	sf_r7_bank;
129243b5df4Smiod 	int	sf_macl;
130243b5df4Smiod 	int	sf_mach;
13195c7671fSmiod };
13295c7671fSmiod 
13395c7671fSmiod #endif /* !_SH_FRAME_H_ */
134