1 /* $OpenBSD: regnum.h,v 1.3 1999/01/27 04:46:06 imp Exp $ */
4 * SPDX-License-Identifier: BSD-3-Clause
6 * Copyright (c) 1988 University of Utah.
7 * Copyright (c) 1992, 1993
8 * The Regents of the University of California. All rights reserved.
10 * This code is derived from software contributed to Berkeley by
11 * the Systems Programming Group of the University of Utah Computer
12 * Science Department and Ralph Campbell.
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 * 3. 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.
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
38 * from: Utah Hdr: reg.h 1.1 90/07/09
39 * @(#)reg.h 8.2 (Berkeley) 1/11/94
40 * JNPR: regnum.h,v 1.6 2007/08/09 11:23:32 katta
44 #ifndef _MACHINE_REGNUM_H_
45 #define _MACHINE_REGNUM_H_
48 * Location of the saved registers relative to ZERO.
49 * This must match struct trapframe defined in frame.h exactly.
50 * This must also match regdef.h.
60 #if defined(__mips_n32) || defined(__mips_n64)
96 #define PS SR /* alias for SR */
103 * IC is valid only on RM7K and RM9K processors. Access to this is
104 * controlled by IC_INT_REG which defined in kernel config
107 #define DUMMY 39 /* for 8 byte alignment */
108 #define NUMSAVEREGS 40
111 * Pseudo registers so we save a complete set of registers regardless of
112 * the ABI. See regdef.h for a more complete explanation.
114 #if defined(__mips_n32) || defined(__mips_n64)
128 * Index of FP registers in 'struct frame', counting from the beginning
129 * of the frame (i.e., including the general registers).
131 #define FPBASE NUMSAVEREGS
132 #define F0 (FPBASE+0)
133 #define F1 (FPBASE+1)
134 #define F2 (FPBASE+2)
135 #define F3 (FPBASE+3)
136 #define F4 (FPBASE+4)
137 #define F5 (FPBASE+5)
138 #define F6 (FPBASE+6)
139 #define F7 (FPBASE+7)
140 #define F8 (FPBASE+8)
141 #define F9 (FPBASE+9)
142 #define F10 (FPBASE+10)
143 #define F11 (FPBASE+11)
144 #define F12 (FPBASE+12)
145 #define F13 (FPBASE+13)
146 #define F14 (FPBASE+14)
147 #define F15 (FPBASE+15)
148 #define F16 (FPBASE+16)
149 #define F17 (FPBASE+17)
150 #define F18 (FPBASE+18)
151 #define F19 (FPBASE+19)
152 #define F20 (FPBASE+20)
153 #define F21 (FPBASE+21)
154 #define F22 (FPBASE+22)
155 #define F23 (FPBASE+23)
156 #define F24 (FPBASE+24)
157 #define F25 (FPBASE+25)
158 #define F26 (FPBASE+26)
159 #define F27 (FPBASE+27)
160 #define F28 (FPBASE+28)
161 #define F29 (FPBASE+29)
162 #define F30 (FPBASE+30)
163 #define F31 (FPBASE+31)
164 #define FSR (FPBASE+32)
165 #define FIR (FPBASE+33)
169 #define NREGS (NUMSAVEREGS + NUMFPREGS)
172 * Index of FP registers in 'struct frame', relative to the base
173 * of the FP registers in frame (i.e., *not* including the general
211 #endif /* !_MACHINE_REGNUM_H_ */