xref: /386bsd/usr/src/kernel/fpu-emu/fpu_asm.h (revision a2142627)
1 /*
2  *  fpu_asm.h
3  *
4  *
5  * Copyright (C) 1992, 1993  W. Metzenthen, 22 Parker St, Ormond,
6  *                           Vic 3163, Australia.
7  *                           E-mail apm233m@vaxc.cc.monash.edu.au
8  * All rights reserved.
9  *
10  * This copyright notice covers the redistribution and use of the
11  * FPU emulator developed by W. Metzenthen. It covers only its use
12  * in the 386BSD operating system. Any other use is not permitted
13  * under this copyright.
14  *
15  * Redistribution and use in source and binary forms, with or without
16  * modification, are permitted provided that the following conditions
17  * are met:
18  * 1. Redistributions of source code must retain the above copyright
19  *    notice, this list of conditions and the following disclaimer.
20  * 2. Redistributions in binary form must include information specifying
21  *    that source code for the emulator is freely available and include
22  *    either:
23  *      a) an offer to provide the source code for a nominal distribution
24  *         fee, or
25  *      b) list at least two alternative methods whereby the source
26  *         can be obtained, e.g. a publically accessible bulletin board
27  *         and an anonymous ftp site from which the software can be
28  *         downloaded.
29  * 3. All advertising materials specifically mentioning features or use of
30  *    this emulator must acknowledge that it was developed by W. Metzenthen.
31  * 4. The name of W. Metzenthen may not be used to endorse or promote
32  *    products derived from this software without specific prior written
33  *    permission.
34  *
35  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
36  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
37  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
38  * W. METZENTHEN BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
39  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
40  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
41  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
42  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
43  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
44  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45  *
46  */
47 
48 #ifndef _FPU_ASM_H_
49 #define _FPU_ASM_H_
50 
51 #include "fpu_emu.h"
52 
53 #define	EXCEPTION	_exception
54 
55 
56 #define PARAM1	8(%ebp)
57 #define	PARAM2	12(%ebp)
58 #define	PARAM3	16(%ebp)
59 #define	PARAM4	20(%ebp)
60 
61 #define SIGL_OFFSET 8
62 #define SIGN(x)	(x)
63 #define	TAG(x)	1(x)
64 #define	EXP(x)	4(x)
65 #define SIG(x)	SIGL_OFFSET##(x)
66 #define	SIGL(x)	SIGL_OFFSET##(x)
67 #define	SIGH(x)	12(x)
68 
69 #endif _FPU_ASM_H_
70