1129198Scognet/*	$NetBSD: fp.h,v 1.1 2001/01/10 19:02:06 bjh21 Exp $	*/
2129198Scognet
3139735Simp/*-
4129198Scognet * Copyright (c) 1995 Mark Brinicombe.
5129198Scognet * Copyright (c) 1995 Brini.
6129198Scognet * All rights reserved.
7129198Scognet *
8129198Scognet * This code is derived from software written for Brini by Mark Brinicombe
9129198Scognet *
10129198Scognet * Redistribution and use in source and binary forms, with or without
11129198Scognet * modification, are permitted provided that the following conditions
12129198Scognet * are met:
13129198Scognet * 1. Redistributions of source code must retain the above copyright
14129198Scognet *    notice, this list of conditions and the following disclaimer.
15129198Scognet * 2. Redistributions in binary form must reproduce the above copyright
16129198Scognet *    notice, this list of conditions and the following disclaimer in the
17129198Scognet *    documentation and/or other materials provided with the distribution.
18129198Scognet * 3. All advertising materials mentioning features or use of this software
19129198Scognet *    must display the following acknowledgement:
20129198Scognet *	This product includes software developed by Brini.
21129198Scognet * 4. The name of the company nor the name of the author may be used to
22129198Scognet *    endorse or promote products derived from this software without specific
23129198Scognet *    prior written permission.
24129198Scognet *
25129198Scognet * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
26129198Scognet * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
27129198Scognet * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28129198Scognet * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29129198Scognet * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30129198Scognet * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31129198Scognet * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32129198Scognet * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33129198Scognet * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34129198Scognet * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35129198Scognet * SUCH DAMAGE.
36129198Scognet *
37129198Scognet * RiscBSD kernel project
38129198Scognet *
39129198Scognet * fp.h
40129198Scognet *
41129198Scognet * FP info
42129198Scognet *
43129198Scognet * Created      : 10/10/95
44129198Scognet *
45129198Scognet * $FreeBSD: releng/11.0/sys/arm/include/fp.h 263914 2014-03-29 14:35:36Z andrew $
46129198Scognet */
47129198Scognet
48129198Scognet#ifndef _MACHINE_FP_H
49129198Scognet#define _MACHINE_FP_H
50129198Scognet
51129198Scognet/*
52129198Scognet * An extended precision floating point number
53129198Scognet */
54129198Scognet
55129198Scognettypedef struct fp_extended_precision {
56129198Scognet	u_int32_t fp_exponent;
57129198Scognet	u_int32_t fp_mantissa_hi;
58129198Scognet	u_int32_t fp_mantissa_lo;
59129198Scognet} fp_extended_precision_t;
60129198Scognet
61129198Scognettypedef struct fp_extended_precision fp_reg_t;
62129198Scognet
63129198Scognet/*
64129198Scognet * Information about the FPE-SP state that is stored in the pcb
65129198Scognet *
66129198Scognet * This needs to move and be hidden from userland.
67129198Scognet */
68129198Scognet
69239268Sgonzostruct vfp_state {
70239268Sgonzo	u_int64_t reg[32];
71239268Sgonzo	u_int32_t fpscr;
72263914Sandrew	u_int32_t fpexec;
73263914Sandrew	u_int32_t fpinst;
74263914Sandrew	u_int32_t fpinst2;
75239268Sgonzo};
76129198Scognet
77129198Scognet/*
78129198Scognet * Type for a saved FP context, if we want to translate the context to a
79129198Scognet * user-readable form
80129198Scognet */
81236992Simp
82129198Scognettypedef struct {
83129198Scognet	u_int32_t fpsr;
84129198Scognet	fp_extended_precision_t regs[8];
85129198Scognet} fp_state_t;
86129198Scognet
87129198Scognet#endif /* _MACHINE_FP_H_ */
88129198Scognet
89129198Scognet/* End of fp.h */
90