]>
git.saurik.com Git - apple/xnu.git/blob - EXTERNAL_HEADERS/architecture/i386/fpu.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
26 * Copyright (c) 1992 NeXT Computer, Inc.
28 * Intel386 Family: Floating Point unit.
32 * 5 October 1992 ? at NeXT
33 * Added names to previously unamed fields in the mantissa.
35 * 5 April 1992 ? at NeXT
43 typedef struct fp_data_reg
{
45 unsigned short mant1
:16,
48 unsigned short exp
:15,
53 * Data register stack.
56 typedef struct fp_stack
{
61 * Register stack tag word.
64 typedef struct fp_tag
{
65 unsigned short tag0
:2,
73 #define FP_TAG_VALID 0
76 #define FP_TAG_EMPTY 3
83 typedef struct fp_status
{
84 unsigned short invalid
:1,
104 typedef struct fp_control
{
105 unsigned short invalid
:1,
113 #define FP_PREC_24B 0
114 #define FP_PREC_53B 2
115 #define FP_PREC_64B 3
117 #define FP_RND_NEAR 0
118 #define FP_RND_DOWN 1
125 #include <architecture/i386/sel.h>
128 * Floating point 'environment'
129 * used by FSTENV/FLDENV instructions.
132 typedef struct fp_env
{
133 fp_control_t control
;
141 unsigned short opcode
;
148 * Floating point state
149 * used by FSAVE/FRSTOR instructions.
152 typedef struct fp_state
{