1178172Simp/*	$OpenBSD: reg.h,v 1.1 1998/01/28 11:14:53 pefo Exp $	*/
2178172Simp
3178172Simp/*-
4178172Simp * Copyright (c) 1988 University of Utah.
5178172Simp * Copyright (c) 1992, 1993
6178172Simp *	The Regents of the University of California.  All rights reserved.
7178172Simp *
8178172Simp * This code is derived from software contributed to Berkeley by
9178172Simp * the Systems Programming Group of the University of Utah Computer
10178172Simp * Science Department and Ralph Campbell.
11178172Simp *
12178172Simp * Redistribution and use in source and binary forms, with or without
13178172Simp * modification, are permitted provided that the following conditions
14178172Simp * are met:
15178172Simp * 1. Redistributions of source code must retain the above copyright
16178172Simp *    notice, this list of conditions and the following disclaimer.
17178172Simp * 2. Redistributions in binary form must reproduce the above copyright
18178172Simp *    notice, this list of conditions and the following disclaimer in the
19178172Simp *    documentation and/or other materials provided with the distribution.
20178172Simp * 4. Neither the name of the University nor the names of its contributors
21178172Simp *    may be used to endorse or promote products derived from this software
22178172Simp *    without specific prior written permission.
23178172Simp *
24178172Simp * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25178172Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26178172Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27178172Simp * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28178172Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29178172Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30178172Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31178172Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32178172Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33178172Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34178172Simp * SUCH DAMAGE.
35178172Simp *
36178172Simp *	from: Utah Hdr: reg.h 1.1 90/07/09
37178172Simp *	@(#)reg.h	8.2 (Berkeley) 1/11/94
38178172Simp *	JNPR: reg.h,v 1.6 2006/09/15 12:52:34 katta
39178172Simp * $FreeBSD$
40178172Simp */
41178172Simp
42178172Simp#ifndef _MACHINE_REG_H_
43178172Simp#define	_MACHINE_REG_H_
44178172Simp
45178172Simp/*
46178172Simp * Location of the users' stored registers relative to ZERO.
47178172Simp * must be visible to assembly code.
48178172Simp */
49178172Simp#include <machine/regnum.h>
50178172Simp
51178172Simp/*
52178172Simp * Register set accessible via /proc/$pid/reg
53178172Simp */
54178172Simpstruct reg {
55178172Simp	register_t r_regs[NUMSAVEREGS];	/* numbered as above */
56178172Simp};
57178172Simp
58178172Simpstruct fpreg {
59178172Simp	f_register_t r_regs[NUMFPREGS];
60178172Simp};
61178172Simp
62178172Simp/*
63178172Simp * Placeholder.
64178172Simp */
65178172Simpstruct dbreg {
66178172Simp	unsigned long junk;
67178172Simp};
68178172Simp
69178172Simp#ifdef _KERNEL
70178172Simpint	fill_fpregs(struct thread *, struct fpreg *);
71178172Simpint	fill_regs(struct thread *, struct reg *);
72178172Simpint	set_fpregs(struct thread *, struct fpreg *);
73178172Simpint	set_regs(struct thread *, struct reg *);
74178172Simpint	fill_dbregs(struct thread *, struct dbreg *);
75178172Simpint	set_dbregs(struct thread *, struct dbreg *);
76178172Simp#endif
77178172Simp
78178172Simp#endif /* !_MACHINE_REG_H_ */
79