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 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 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
|
32#ifndef _IA64_FPREG_DEFINED
|
32#include <machine/_regset.h> |
33
|
34struct ia64_fpreg {
35 uint64_t fpr_bits[2];
36} __aligned(16);
37
38#define _IA64_FPREG_DEFINED
39
40#endif
41
|
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; |
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; |
44}; 45 46struct dbreg { 47 uint64_t dbr_data[8]; 48 uint64_t dbr_inst[8]; 49}; 50 51#ifdef _KERNEL
|
71
|
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. */ |
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_ */
|