fp.h revision 129198
1129198Scognet/* $NetBSD: fp.h,v 1.1 2001/01/10 19:02:06 bjh21 Exp $ */ 2129198Scognet 3129198Scognet/* 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: head/sys/arm/include/fp.h 129198 2004-05-14 11:46:45Z cognet $ 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 69129198Scognetstruct fpe_sp_state { 70129198Scognet unsigned int fp_flags; 71129198Scognet unsigned int fp_sr; 72129198Scognet unsigned int fp_cr; 73129198Scognet fp_reg_t fp_registers[16]; 74129198Scognet}; 75129198Scognet 76129198Scognet/* 77129198Scognet * Type for a saved FP context, if we want to translate the context to a 78129198Scognet * user-readable form 79129198Scognet */ 80129198Scognet 81129198Scognettypedef struct { 82129198Scognet u_int32_t fpsr; 83129198Scognet fp_extended_precision_t regs[8]; 84129198Scognet} fp_state_t; 85129198Scognet 86129198Scognet#endif /* _MACHINE_FP_H_ */ 87129198Scognet 88129198Scognet/* End of fp.h */ 89