]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - lib/libc/sparc64/fpu/fpu_extern.h
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / lib / libc / sparc64 / fpu / fpu_extern.h
1 /*-
2  * Copyright (c) 1995 The NetBSD Foundation, Inc.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to The NetBSD Foundation
6  * by Christos Zoulas.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  * 3. All advertising materials mentioning features or use of this software
17  *    must display the following acknowledgement:
18  *        This product includes software developed by the NetBSD
19  *        Foundation, Inc. and its contributors.
20  * 4. Neither the name of The NetBSD Foundation nor the names of its
21  *    contributors may be used to endorse or promote products derived
22  *    from this software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
25  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
28  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  *      $NetBSD: fpu_extern.h,v 1.4 2000/08/03 18:32:08 eeh Exp $
37  * $FreeBSD$
38  */
39
40 #ifndef _SPARC64_FPU_FPU_EXTERN_H_
41 #define _SPARC64_FPU_FPU_EXTERN_H_
42
43 struct utrapframe;
44 struct fpemu;
45 struct fpn;
46
47 /* fpu.c */
48 int __fpu_exception(struct utrapframe *tf);
49
50 /* fpu_add.c */
51 struct fpn *__fpu_add(struct fpemu *);
52
53 /* fpu_compare.c */
54 void __fpu_compare(struct fpemu *, int, int);
55
56 /* fpu_div.c */
57 struct fpn *__fpu_div(struct fpemu *);
58
59 /* fpu_explode.c */
60 int __fpu_itof(struct fpn *, u_int);
61 int __fpu_xtof(struct fpn *, u_int64_t);
62 int __fpu_stof(struct fpn *, u_int);
63 int __fpu_dtof(struct fpn *, u_int, u_int);
64 int __fpu_qtof(struct fpn *, u_int, u_int, u_int, u_int);
65 void __fpu_explode(struct fpemu *, struct fpn *, int, int);
66
67 /* fpu_implode.c */
68 u_int __fpu_ftoi(struct fpemu *, struct fpn *);
69 u_int __fpu_ftox(struct fpemu *, struct fpn *, u_int *);
70 u_int __fpu_ftos(struct fpemu *, struct fpn *);
71 u_int __fpu_ftod(struct fpemu *, struct fpn *, u_int *);
72 u_int __fpu_ftoq(struct fpemu *, struct fpn *, u_int *);
73 void __fpu_implode(struct fpemu *, struct fpn *, int, u_int *);
74
75 /* fpu_mul.c */
76 struct fpn *__fpu_mul(struct fpemu *);
77
78 /* fpu_sqrt.c */
79 struct fpn *__fpu_sqrt(struct fpemu *);
80
81 /* fpu_subr.c */
82 /*
83  * Shift a number right some number of bits, taking care of round/sticky.
84  * Note that the result is probably not a well-formed number (it will lack
85  * the normal 1-bit mant[0]&FP_1).
86  */
87 int __fpu_shr(register struct fpn *, register int);
88 void __fpu_norm(register struct fpn *);
89 /* Build a new Quiet NaN (sign=0, frac=all 1's). */
90 struct fpn *__fpu_newnan(register struct fpemu *);
91
92 #endif /* !_SPARC64_FPU_FPU_EXTERN_H_ */