1182219Sjkim/*	$NetBSD: fp.h,v 1.1 2001/01/10 19:02:06 bjh21 Exp $	*/
2182393Sjkim
3182219Sjkim/*-
4182219Sjkim * Copyright (c) 1995 Mark Brinicombe.
5182219Sjkim * Copyright (c) 1995 Brini.
6182219Sjkim * All rights reserved.
7182219Sjkim *
8182219Sjkim * This code is derived from software written for Brini by Mark Brinicombe
9182393Sjkim *
10199604Sjkim * Redistribution and use in source and binary forms, with or without
11182219Sjkim * modification, are permitted provided that the following conditions
12182219Sjkim * are met:
13182219Sjkim * 1. Redistributions of source code must retain the above copyright
14182219Sjkim *    notice, this list of conditions and the following disclaimer.
15182219Sjkim * 2. Redistributions in binary form must reproduce the above copyright
16182219Sjkim *    notice, this list of conditions and the following disclaimer in the
17182219Sjkim *    documentation and/or other materials provided with the distribution.
18182219Sjkim * 3. All advertising materials mentioning features or use of this software
19182219Sjkim *    must display the following acknowledgement:
20182219Sjkim *	This product includes software developed by Brini.
21182219Sjkim * 4. The name of the company nor the name of the author may be used to
22182219Sjkim *    endorse or promote products derived from this software without specific
23182219Sjkim *    prior written permission.
24182219Sjkim *
25182219Sjkim * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
26182219Sjkim * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
27182219Sjkim * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28182219Sjkim * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29182219Sjkim * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30182219Sjkim * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31182393Sjkim * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32199604Sjkim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33199604Sjkim * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34199604Sjkim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35182219Sjkim * SUCH DAMAGE.
36182219Sjkim *
37 * RiscBSD kernel project
38 *
39 * fp.h
40 *
41 * FP info
42 *
43 * Created      : 10/10/95
44 *
45 * $FreeBSD$
46 */
47
48#ifndef _MACHINE_FP_H
49#define _MACHINE_FP_H
50
51/*
52 * An extended precision floating point number
53 */
54
55typedef struct fp_extended_precision {
56	u_int32_t fp_exponent;
57	u_int32_t fp_mantissa_hi;
58	u_int32_t fp_mantissa_lo;
59} fp_extended_precision_t;
60
61typedef struct fp_extended_precision fp_reg_t;
62
63/*
64 * Information about the FPE-SP state that is stored in the pcb
65 *
66 * This needs to move and be hidden from userland.
67 */
68
69struct vfp_state {
70	u_int64_t reg[32];
71	u_int32_t fpscr;
72};
73
74/*
75 * Type for a saved FP context, if we want to translate the context to a
76 * user-readable form
77 */
78
79typedef struct {
80	u_int32_t fpsr;
81	fp_extended_precision_t regs[8];
82} fp_state_t;
83
84#endif /* _MACHINE_FP_H_ */
85
86/* End of fp.h */
87