Deleted Added
full compact
reg.h (103834) reg.h (115084)
1/*-
2 * Copyright (c) 2000 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2000 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/ia64/include/reg.h 103834 2002-09-23 05:55:10Z peter $
26 * $FreeBSD: head/sys/ia64/include/reg.h 115084 2003-05-16 21:26:42Z marcel $
27 */
28
29#ifndef _MACHINE_REG_H_
30#define _MACHINE_REG_H_
31
27 */
28
29#ifndef _MACHINE_REG_H_
30#define _MACHINE_REG_H_
31
32#ifndef _IA64_FPREG_DEFINED
32#include <machine/_regset.h>
33
33
34struct ia64_fpreg {
35 uint64_t fpr_bits[2];
36} __aligned(16);
37
38#define _IA64_FPREG_DEFINED
39
40#endif
41
42struct reg {
34struct reg {
43 uint64_t r_gr[128];
44 uint64_t r_br[8];
45 uint64_t r_cfm;
46 uint64_t r_ip; /* Bits 0-3 encode the slot number */
47 uint64_t r_pr;
48 uint64_t r_psr; /* User mask */
49 uint64_t r_ar_rsc;
50 uint64_t r_ar_bsp;
51 uint64_t r_ar_bspstore;
52 uint64_t r_ar_rnat;
53 uint64_t r_ar_ccv;
54 uint64_t r_ar_unat;
55 uint64_t r_ar_fpsr;
56 uint64_t r_ar_pfs;
57 uint64_t r_ar_lc;
58 uint64_t r_ar_ec;
35 struct _special r_special;
36 struct _callee_saved r_preserved;
37 struct _caller_saved r_scratch;
59};
60
61struct fpreg {
38};
39
40struct fpreg {
62 struct ia64_fpreg fpr_regs[128];
41 struct _callee_saved_fp fpr_preserved;
42 struct _caller_saved_fp fpr_scratch;
43 struct _high_fp fpr_high;
63};
64
65struct dbreg {
66 uint64_t dbr_data[8];
67 uint64_t dbr_inst[8];
68};
69
70#ifdef _KERNEL
44};
45
46struct dbreg {
47 uint64_t dbr_data[8];
48 uint64_t dbr_inst[8];
49};
50
51#ifdef _KERNEL
71
72struct thread;
73
52struct thread;
53
74void restorehighfp(struct ia64_fpreg *);
75void savehighfp(struct ia64_fpreg *);
76
77/*
78 * XXX these interfaces are MI, so they should be declared in a MI place.
79 */
54/* XXX these interfaces are MI, so they should be declared in a MI place. */
80int fill_regs(struct thread *, struct reg *);
81int set_regs(struct thread *, struct reg *);
82int fill_fpregs(struct thread *, struct fpreg *);
83int set_fpregs(struct thread *, struct fpreg *);
84int fill_dbregs(struct thread *, struct dbreg *);
85int set_dbregs(struct thread *, struct dbreg *);
86#endif
87
88#endif /* _MACHINE_REG_H_ */
55int fill_regs(struct thread *, struct reg *);
56int set_regs(struct thread *, struct reg *);
57int fill_fpregs(struct thread *, struct fpreg *);
58int set_fpregs(struct thread *, struct fpreg *);
59int fill_dbregs(struct thread *, struct dbreg *);
60int set_dbregs(struct thread *, struct dbreg *);
61#endif
62
63#endif /* _MACHINE_REG_H_ */