xref: /openbsd-src/sys/arch/m88k/include/fpu.h (revision 203eb91acc2ffb2009d5c59a13ca37bd2340359d)
1*203eb91aSmiod /*	$OpenBSD: fpu.h,v 1.2 2014/07/01 20:26:09 miod Exp $	*/
2625eedbaSmiod 
3625eedbaSmiod /*
4*203eb91aSmiod  * Copyright (c) 2007, 2014, Miodrag Vallat.
5625eedbaSmiod  *
6625eedbaSmiod  * Permission to use, copy, modify, and distribute this software for any
7625eedbaSmiod  * purpose with or without fee is hereby granted, provided that the above
8625eedbaSmiod  * copyright notice, this permission notice, and the disclaimer below
9625eedbaSmiod  * appear in all copies.
10625eedbaSmiod  *
11625eedbaSmiod  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12625eedbaSmiod  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13625eedbaSmiod  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14625eedbaSmiod  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15625eedbaSmiod  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16625eedbaSmiod  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17625eedbaSmiod  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18625eedbaSmiod  */
19625eedbaSmiod 
20625eedbaSmiod #ifndef	_M88K_FPU_H_
21625eedbaSmiod #define	_M88K_FPU_H_
22625eedbaSmiod 
23625eedbaSmiod /* FPECR bits */
24625eedbaSmiod #define	FPECR_FIOV	0x80
25625eedbaSmiod #define	FPECR_FUNIMP	0x40
26625eedbaSmiod #define	FPECR_FPRV	0x20
27625eedbaSmiod #define	FPECR_FROP	0x10
28625eedbaSmiod #define	FPECR_FDVZ	0x08
29625eedbaSmiod #define	FPECR_FUNF	0x04
30625eedbaSmiod #define	FPECR_FOVF	0x02
31625eedbaSmiod #define	FPECR_FINX	0x01
32625eedbaSmiod 
33625eedbaSmiod /* FPSR and FPCR exception bits */
34625eedbaSmiod #define	FPSR_EFINV	0x10
35625eedbaSmiod #define	FPSR_EFDVZ	0x08
36625eedbaSmiod #define	FPSR_EFUNF	0x04
37625eedbaSmiod #define	FPSR_EFOVF	0x02
38625eedbaSmiod #define	FPSR_EFINX	0x01
39625eedbaSmiod 
40*203eb91aSmiod /* FPIT bits */
41*203eb91aSmiod #define	FPIT_DBL	0x00000400
42*203eb91aSmiod 
43*203eb91aSmiod /* FPRH bits and masks */
44*203eb91aSmiod #define	FPRH_SIGN	0x80000000
45*203eb91aSmiod #define	FPRH_ADDONE	0x02000000
46*203eb91aSmiod #define	FPRH_MANTH_MASK	0x001fffff
47*203eb91aSmiod #define	FPRH_MANTH_BITS	21
48*203eb91aSmiod 
49625eedbaSmiod #endif	/* _M88K_FPU_H_ */
50