xref: /dragonfly/sys/sys/reg.h (revision 2c64e990)
1a9295349SMatthew Dillon /*-
2a9295349SMatthew Dillon  * Copyright (c) 1990 The Regents of the University of California.
3a9295349SMatthew Dillon  * All rights reserved.
4a9295349SMatthew Dillon  *
5a9295349SMatthew Dillon  * This code is derived from software contributed to Berkeley by
6a9295349SMatthew Dillon  * William Jolitz.
7a9295349SMatthew Dillon  *
8a9295349SMatthew Dillon  * Redistribution and use in source and binary forms, with or without
9a9295349SMatthew Dillon  * modification, are permitted provided that the following conditions
10a9295349SMatthew Dillon  * are met:
11a9295349SMatthew Dillon  * 1. Redistributions of source code must retain the above copyright
12a9295349SMatthew Dillon  *    notice, this list of conditions and the following disclaimer.
13a9295349SMatthew Dillon  * 2. Redistributions in binary form must reproduce the above copyright
14a9295349SMatthew Dillon  *    notice, this list of conditions and the following disclaimer in the
15a9295349SMatthew Dillon  *    documentation and/or other materials provided with the distribution.
16*2c64e990Szrj  * 3. Neither the name of the University nor the names of its contributors
17a9295349SMatthew Dillon  *    may be used to endorse or promote products derived from this software
18a9295349SMatthew Dillon  *    without specific prior written permission.
19a9295349SMatthew Dillon  *
20a9295349SMatthew Dillon  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21a9295349SMatthew Dillon  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22a9295349SMatthew Dillon  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23a9295349SMatthew Dillon  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24a9295349SMatthew Dillon  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25a9295349SMatthew Dillon  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26a9295349SMatthew Dillon  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27a9295349SMatthew Dillon  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28a9295349SMatthew Dillon  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29a9295349SMatthew Dillon  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30a9295349SMatthew Dillon  * SUCH DAMAGE.
31a9295349SMatthew Dillon  *
32a9295349SMatthew Dillon  *	from: @(#)reg.h	5.5 (Berkeley) 1/18/91
33a9295349SMatthew Dillon  * $FreeBSD: src/sys/i386/include/reg.h,v 1.22.2.2 2002/11/07 22:47:55 alfred Exp $
3408f2f1bbSSimon Schubert  * $DragonFly: src/sys/sys/reg.h,v 1.3 2007/02/03 17:05:59 corecode Exp $
35527fddf7SMatthew Dillon  */
36527fddf7SMatthew Dillon /*
37527fddf7SMatthew Dillon  * Machine independant interface to abstract cpu registers that a process
38527fddf7SMatthew Dillon  * might have to manipulate (reg, fpreg, and dbreg structures).
39a9295349SMatthew Dillon  */
40a9295349SMatthew Dillon 
41527fddf7SMatthew Dillon #ifndef _SYS_REG_H_
42527fddf7SMatthew Dillon #define	_SYS_REG_H_
43a9295349SMatthew Dillon 
44527fddf7SMatthew Dillon #include <machine/reg.h>
45a9295349SMatthew Dillon 
46a9295349SMatthew Dillon #ifdef _KERNEL
47a9295349SMatthew Dillon 
48a9295349SMatthew Dillon #ifndef _SYS_TYPES_H_
49a9295349SMatthew Dillon #include <sys/types.h>
50a9295349SMatthew Dillon #endif
51a9295349SMatthew Dillon 
52a9295349SMatthew Dillon struct proc;
53a9295349SMatthew Dillon struct lwp;
54a9295349SMatthew Dillon 
55527fddf7SMatthew Dillon int	fill_fpregs (struct lwp *, struct fpreg *);
56527fddf7SMatthew Dillon int	fill_regs (struct lwp *lp, struct reg *regs);
57527fddf7SMatthew Dillon int	fill_dbregs (struct lwp *lp, struct dbreg *dbregs);
58a9295349SMatthew Dillon int	set_fpregs (struct lwp *, struct fpreg *);
59a9295349SMatthew Dillon int	set_regs (struct lwp *lp, struct reg *regs);
6008f2f1bbSSimon Schubert void	exec_setregs (u_long, u_long, u_long);
61a9295349SMatthew Dillon int	set_dbregs (struct lwp *lp, struct dbreg *dbregs);
62a9295349SMatthew Dillon 
63a9295349SMatthew Dillon #endif
64a9295349SMatthew Dillon 
65527fddf7SMatthew Dillon #endif /* !_SYS_REG_H_ */
66