xref: /openbsd/sys/arch/mips64/include/frame.h (revision 4cab4d08)
1 /*	$OpenBSD: frame.h,v 1.8 2021/04/29 12:49:19 visa Exp $ */
2 
3 /*
4  * Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se)
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
16  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25  * SUCH DAMAGE.
26  *
27  */
28 #ifndef _MIPS64_FRAME_H_
29 #define	_MIPS64_FRAME_H_
30 
31 /*
32  *  The layout of this *must* match with regnum.h or bad things
33  *  will happen. libc setjmp/longjmp depends on this as well.
34  */
35 struct trapframe {
36 	register_t	zero;
37 	register_t	ast;
38 	register_t	v0;
39 	register_t	v1;
40 	register_t	a0;
41 	register_t	a1;
42 	register_t	a2;
43 	register_t	a3;
44 	register_t	a4; /* ta0 */
45 	register_t	a5; /* ta1 */
46 	register_t	a6; /* ta2 */
47 	register_t	a7; /* ta3 */
48 	register_t	t0;
49 	register_t	t1;
50 	register_t	t2;
51 	register_t	t3;
52 	register_t	s0;
53 	register_t	s1;
54 	register_t	s2;
55 	register_t	s3;
56 	register_t	s4;
57 	register_t	s5;
58 	register_t	s6;
59 	register_t	s7;
60 	register_t	t8;
61 	register_t	t9;
62 	register_t	k0;
63 	register_t	k1;
64 	register_t	gp;
65 	register_t	sp;
66 	register_t	s8;
67 	register_t	ra;
68 	register_t	sr;
69 	register_t	mullo;
70 	register_t	mulhi;
71 	register_t	badvaddr;
72 	register_t	cause;
73 	register_t	pc;
74 	register_t	ic; /* unused, was RM7000 ICR */
75 	register_t	ipl;
76 
77 /* From here and on, only saved user processes. */
78 
79 	f_register_t	f0;
80 	f_register_t	f1;
81 	f_register_t	f2;
82 	f_register_t	f3;
83 	f_register_t	f4;
84 	f_register_t	f5;
85 	f_register_t	f6;
86 	f_register_t	f7;
87 	f_register_t	f8;
88 	f_register_t	f9;
89 	f_register_t	f10;
90 	f_register_t	f11;
91 	f_register_t	f12;
92 	f_register_t	f13;
93 	f_register_t	f14;
94 	f_register_t	f15;
95 	f_register_t	f16;
96 	f_register_t	f17;
97 	f_register_t	f18;
98 	f_register_t	f19;
99 	f_register_t	f20;
100 	f_register_t	f21;
101 	f_register_t	f22;
102 	f_register_t	f23;
103 	f_register_t	f24;
104 	f_register_t	f25;
105 	f_register_t	f26;
106 	f_register_t	f27;
107 	f_register_t	f28;
108 	f_register_t	f29;
109 	f_register_t	f30;
110 	f_register_t	f31;
111 	register_t	fsr;
112 };
113 
114 #endif	/* !_MIPS64_FRAME_H_ */
115