fpreg.h revision 1.2 1 1.2 matt /* $NetBSD: fpreg.h,v 1.2 2013/07/18 22:18:31 matt Exp $ */
2 1.1 martin
3 1.1 martin /*
4 1.1 martin * Copyright (c) 1995 Gordon Ross
5 1.1 martin * Copyright (c) 1995 Ken Nakata
6 1.1 martin * All rights reserved.
7 1.1 martin *
8 1.1 martin * Redistribution and use in source and binary forms, with or without
9 1.1 martin * modification, are permitted provided that the following conditions
10 1.1 martin * are met:
11 1.1 martin * 1. Redistributions of source code must retain the above copyright
12 1.1 martin * notice, this list of conditions and the following disclaimer.
13 1.1 martin * 2. Redistributions in binary form must reproduce the above copyright
14 1.1 martin * notice, this list of conditions and the following disclaimer in the
15 1.1 martin * documentation and/or other materials provided with the distribution.
16 1.1 martin * 3. The name of the author may not be used to endorse or promote products
17 1.1 martin * derived from this software without specific prior written permission.
18 1.1 martin * 4. All advertising materials mentioning features or use of this software
19 1.1 martin * must display the following acknowledgement:
20 1.1 martin * This product includes software developed by Gordon Ross
21 1.1 martin *
22 1.1 martin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 1.1 martin * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 1.1 martin * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 1.1 martin * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 1.1 martin * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 1.1 martin * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 1.1 martin * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 1.1 martin * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 1.1 martin * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 1.1 martin * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 1.1 martin */
33 1.1 martin
34 1.1 martin #ifndef _FPREG_H_
35 1.1 martin #define _FPREG_H_
36 1.1 martin
37 1.1 martin
38 1.1 martin /*
39 1.1 martin * MC68881/68882 FPcr bit definitions
40 1.1 martin */
41 1.1 martin
42 1.1 martin /* fpsr */
43 1.1 martin #define FPSR_CCB 0xff000000
44 1.1 martin # define FPSR_NEG 0x08000000
45 1.1 martin # define FPSR_ZERO 0x04000000
46 1.1 martin # define FPSR_INF 0x02000000
47 1.1 martin # define FPSR_NAN 0x01000000
48 1.1 martin #define FPSR_QTT 0x00ff0000
49 1.1 martin # define FPSR_QSG 0x00800000
50 1.1 martin # define FPSR_QUO 0x007f0000
51 1.1 martin #define FPSR_EXCP 0x0000ff00
52 1.2 matt #define FPSR_EXCP2 0x00003e00
53 1.1 martin # define FPSR_BSUN 0x00008000
54 1.1 martin # define FPSR_SNAN 0x00004000
55 1.1 martin # define FPSR_OPERR 0x00002000
56 1.1 martin # define FPSR_OVFL 0x00001000
57 1.1 martin # define FPSR_UNFL 0x00000800
58 1.1 martin # define FPSR_DZ 0x00000400
59 1.1 martin # define FPSR_INEX2 0x00000200
60 1.1 martin # define FPSR_INEX1 0x00000100
61 1.2 matt #define FPSR_AEX 0x000000f8
62 1.1 martin # define FPSR_AIOP 0x00000080
63 1.1 martin # define FPSR_AOVFL 0x00000040
64 1.1 martin # define FPSR_AUNFL 0x00000020
65 1.1 martin # define FPSR_ADZ 0x00000010
66 1.1 martin # define FPSR_AINEX 0x00000008
67 1.1 martin
68 1.1 martin /* fpcr */
69 1.1 martin #define FPCR_EXCP FPSR_EXCP
70 1.2 matt #define FPCR_EXCP2 FPSR_EXCP2
71 1.1 martin # define FPCR_BSUN FPSR_BSUN
72 1.1 martin # define FPCR_SNAN FPSR_SNAN
73 1.1 martin # define FPCR_OPERR FPSR_OPERR
74 1.1 martin # define FPCR_OVFL FPSR_OVFL
75 1.1 martin # define FPCR_UNFL FPSR_UNFL
76 1.1 martin # define FPCR_DZ FPSR_DZ
77 1.1 martin # define FPCR_INEX2 FPSR_INEX2
78 1.1 martin # define FPCR_INEX1 FPSR_INEX1
79 1.1 martin #define FPCR_MODE 0x000000ff
80 1.1 martin # define FPCR_PREC 0x000000c0
81 1.1 martin # define FPCR_EXTD 0x00000000
82 1.1 martin # define FPCR_SNGL 0x00000040
83 1.1 martin # define FPCR_DBL 0x00000080
84 1.1 martin # define FPCR_ROUND 0x00000030
85 1.1 martin # define FPCR_NEAR 0x00000000
86 1.1 martin # define FPCR_ZERO 0x00000010
87 1.1 martin # define FPCR_MINF 0x00000020
88 1.1 martin # define FPCR_PINF 0x00000030
89 1.1 martin
90 1.1 martin
91 1.1 martin #endif
92 1.1 martin
93