Rev 2479 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2479 | Rev 2927 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | * Copyright (c) 2005 Josef Cejka |
2 | * Copyright (c) 2005 Josef Cejka |
3 | * All rights reserved. |
3 | * All rights reserved. |
4 | * |
4 | * |
5 | * Redistribution and use in source and binary forms, with or without |
5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions |
6 | * modification, are permitted provided that the following conditions |
7 | * are met: |
7 | * are met: |
8 | * |
8 | * |
9 | * - Redistributions of source code must retain the above copyright |
9 | * - Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. |
10 | * notice, this list of conditions and the following disclaimer. |
11 | * - Redistributions in binary form must reproduce the above copyright |
11 | * - Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the |
12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. |
13 | * documentation and/or other materials provided with the distribution. |
14 | * - The name of the author may not be used to endorse or promote products |
14 | * - The name of the author may not be used to endorse or promote products |
15 | * derived from this software without specific prior written permission. |
15 | * derived from this software without specific prior written permission. |
16 | * |
16 | * |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | /** @addtogroup softfloat |
29 | /** @addtogroup softfloat |
30 | * @{ |
30 | * @{ |
31 | */ |
31 | */ |
32 | /** @file |
32 | /** @file |
33 | */ |
33 | */ |
34 | 34 | ||
35 | #ifndef __SOFTFLOAT_H__ |
35 | #ifndef __SOFTFLOAT_H__ |
36 | #define __SOFTFLOAT_H__ |
36 | #define __SOFTFLOAT_H__ |
37 | 37 | ||
38 | float __addsf3(float a, float b); |
38 | float __addsf3(float a, float b); |
39 | double __adddf3(double a, double b); |
39 | double __adddf3(double a, double b); |
40 | long double __addtf3(long double a, long double b); |
40 | long double __addtf3(long double a, long double b); |
41 | long double __addxf3(long double a, long double b); |
41 | long double __addxf3(long double a, long double b); |
42 | 42 | ||
43 | float __subsf3(float a, float b); |
43 | float __subsf3(float a, float b); |
44 | double __subdf3(double a, double b); |
44 | double __subdf3(double a, double b); |
45 | long double __subtf3(long double a, long double b); |
45 | long double __subtf3(long double a, long double b); |
46 | long double __subxf3(long double a, long double b); |
46 | long double __subxf3(long double a, long double b); |
47 | 47 | ||
48 | float __mulsf3(float a, float b); |
48 | float __mulsf3(float a, float b); |
49 | double __muldf3(double a, double b); |
49 | double __muldf3(double a, double b); |
50 | long double __multf3(long double a, long double b); |
50 | long double __multf3(long double a, long double b); |
51 | long double __mulxf3(long double a, long double b); |
51 | long double __mulxf3(long double a, long double b); |
52 | 52 | ||
53 | float __divsf3(float a, float b); |
53 | float __divsf3(float a, float b); |
54 | double __divdf3(double a, double b); |
54 | double __divdf3(double a, double b); |
55 | long double __divtf3(long double a, long double b); |
55 | long double __divtf3(long double a, long double b); |
56 | long double __divxf3(long double a, long double b); |
56 | long double __divxf3(long double a, long double b); |
57 | 57 | ||
58 | float __negsf2(float a); |
58 | float __negsf2(float a); |
59 | double __negdf2(double a); |
59 | double __negdf2(double a); |
60 | long double __negtf2(long double a); |
60 | long double __negtf2(long double a); |
61 | long double __negxf2(long double a); |
61 | long double __negxf2(long double a); |
62 | 62 | ||
63 | double __extendsfdf2(float a); |
63 | double __extendsfdf2(float a); |
64 | long double __extendsftf2(float a); |
64 | long double __extendsftf2(float a); |
65 | long double __extendsfxf2(float a); |
65 | long double __extendsfxf2(float a); |
66 | long double __extenddftf2(double a); |
66 | long double __extenddftf2(double a); |
67 | long double __extenddfxf2(double a); |
67 | long double __extenddfxf2(double a); |
68 | 68 | ||
69 | double __truncxfdf2(long double a); |
69 | double __truncxfdf2(long double a); |
70 | double __trunctfdf2(long double a); |
70 | double __trunctfdf2(long double a); |
71 | float __truncxfsf2(long double a); |
71 | float __truncxfsf2(long double a); |
72 | float __trunctfsf2(long double a); |
72 | float __trunctfsf2(long double a); |
73 | float __truncdfsf2(double a); |
73 | float __truncdfsf2(double a); |
74 | 74 | ||
75 | int __fixsfsi(float a); |
75 | int __fixsfsi(float a); |
76 | int __fixdfsi(double a); |
76 | int __fixdfsi(double a); |
77 | int __fixtfsi(long double a); |
77 | int __fixtfsi(long double a); |
78 | int __fixxfsi(long double a); |
78 | int __fixxfsi(long double a); |
79 | 79 | ||
80 | long __fixsfdi(float a); |
80 | long __fixsfdi(float a); |
81 | long __fixdfdi(double a); |
81 | long __fixdfdi(double a); |
82 | long __fixtfdi(long double a); |
82 | long __fixtfdi(long double a); |
83 | long __fixxfdi(long double a); |
83 | long __fixxfdi(long double a); |
84 | 84 | ||
85 | long long __fixsfti(float a); |
85 | long long __fixsfti(float a); |
86 | long long __fixdfti(double a); |
86 | long long __fixdfti(double a); |
87 | long long __fixtfti(long double a); |
87 | long long __fixtfti(long double a); |
88 | long long __fixxfti(long double a); |
88 | long long __fixxfti(long double a); |
89 | 89 | ||
90 | unsigned int __fixunssfsi(float a); |
90 | unsigned int __fixunssfsi(float a); |
91 | unsigned int __fixunsdfsi(double a); |
91 | unsigned int __fixunsdfsi(double a); |
92 | unsigned int __fixunstfsi(long double a); |
92 | unsigned int __fixunstfsi(long double a); |
93 | unsigned int __fixunsxfsi(long double a); |
93 | unsigned int __fixunsxfsi(long double a); |
94 | 94 | ||
95 | unsigned long __fixunssfdi(float a); |
95 | unsigned long __fixunssfdi(float a); |
96 | unsigned long __fixunsdfdi(double a); |
96 | unsigned long __fixunsdfdi(double a); |
97 | unsigned long __fixunstfdi(long double a); |
97 | unsigned long __fixunstfdi(long double a); |
98 | unsigned long __fixunsxfdi(long double a); |
98 | unsigned long __fixunsxfdi(long double a); |
99 | 99 | ||
100 | unsigned long long __fixunssfti(float a); |
100 | unsigned long long __fixunssfti(float a); |
101 | unsigned long long __fixunsdfti(double a); |
101 | unsigned long long __fixunsdfti(double a); |
102 | unsigned long long __fixunstfti(long double a); |
102 | unsigned long long __fixunstfti(long double a); |
103 | unsigned long long __fixunsxfti(long double a); |
103 | unsigned long long __fixunsxfti(long double a); |
104 | 104 | ||
105 | float __floatsisf(int i); |
105 | float __floatsisf(int i); |
106 | double __floatsidf(int i); |
106 | double __floatsidf(int i); |
107 | long double __floatsitf(int i); |
107 | long double __floatsitf(int i); |
108 | long double __floatsixf(int i); |
108 | long double __floatsixf(int i); |
109 | 109 | ||
110 | float __floatdisf(long i); |
110 | float __floatdisf(long i); |
111 | double __floatdidf(long i); |
111 | double __floatdidf(long i); |
112 | long double __floatditf(long i); |
112 | long double __floatditf(long i); |
113 | long double __floatdixf(long i); |
113 | long double __floatdixf(long i); |
114 | 114 | ||
115 | float __floattisf(long long i); |
115 | float __floattisf(long long i); |
116 | double __floattidf(long long i); |
116 | double __floattidf(long long i); |
117 | long double __floattitf(long long i); |
117 | long double __floattitf(long long i); |
118 | long double __floattixf(long long i); |
118 | long double __floattixf(long long i); |
119 | 119 | ||
120 | float __floatunsisf(unsigned int i); |
120 | float __floatunsisf(unsigned int i); |
121 | double __floatunsidf(unsigned int i); |
121 | double __floatunsidf(unsigned int i); |
122 | long double __floatunsitf(unsigned int i); |
122 | long double __floatunsitf(unsigned int i); |
123 | long double __floatunsixf(unsigned int i); |
123 | long double __floatunsixf(unsigned int i); |
124 | 124 | ||
125 | float __floatundisf(unsigned long i); |
125 | float __floatundisf(unsigned long i); |
126 | double __floatundidf(unsigned long i); |
126 | double __floatundidf(unsigned long i); |
127 | long double __floatunditf(unsigned long i); |
127 | long double __floatunditf(unsigned long i); |
128 | long double __floatundixf(unsigned long i); |
128 | long double __floatundixf(unsigned long i); |
129 | 129 | ||
130 | float __floatuntisf(unsigned long long i); |
130 | float __floatuntisf(unsigned long long i); |
131 | double __floatuntidf(unsigned long long i); |
131 | double __floatuntidf(unsigned long long i); |
132 | long double __floatuntitf(unsigned long long i); |
132 | long double __floatuntitf(unsigned long long i); |
133 | long double __floatuntixf(unsigned long long i); |
133 | long double __floatuntixf(unsigned long long i); |
134 | 134 | ||
135 | int __cmpsf2(float a, float b); |
135 | int __cmpsf2(float a, float b); |
136 | int __cmpdf2(double a, double b); |
136 | int __cmpdf2(double a, double b); |
137 | int __cmptf2(long double a, long double b); |
137 | int __cmptf2(long double a, long double b); |
138 | 138 | ||
139 | int __unordsf2(float a, float b); |
139 | int __unordsf2(float a, float b); |
140 | int __unorddf2(double a, double b); |
140 | int __unorddf2(double a, double b); |
141 | int __unordtf2(long double a, long double b); |
141 | int __unordtf2(long double a, long double b); |
142 | 142 | ||
143 | int __eqsf2(float a, float b); |
143 | int __eqsf2(float a, float b); |
144 | int __eqdf2(double a, double b); |
144 | int __eqdf2(double a, double b); |
145 | int __eqtf2(long double a, long double b); |
145 | int __eqtf2(long double a, long double b); |
146 | 146 | ||
147 | int __nesf2(float a, float b); |
147 | int __nesf2(float a, float b); |
148 | int __nedf2(double a, double b); |
148 | int __nedf2(double a, double b); |
149 | int __netf2(long double a, long double b); |
149 | int __netf2(long double a, long double b); |
150 | 150 | ||
151 | int __gesf2(float a, float b); |
151 | int __gesf2(float a, float b); |
152 | int __gedf2(double a, double b); |
152 | int __gedf2(double a, double b); |
153 | int __getf2(long double a, long double b); |
153 | int __getf2(long double a, long double b); |
154 | 154 | ||
155 | int __ltsf2(float a, float b); |
155 | int __ltsf2(float a, float b); |
156 | int __ltdf2(double a, double b); |
156 | int __ltdf2(double a, double b); |
157 | int __lttf2(long double a, long double b); |
157 | int __lttf2(long double a, long double b); |
158 | int __lesf2(float a, float b); |
158 | int __lesf2(float a, float b); |
159 | int __ledf2(double a, double b); |
159 | int __ledf2(double a, double b); |
160 | int __letf2(long double a, long double b); |
160 | int __letf2(long double a, long double b); |
161 | 161 | ||
162 | int __gtsf2(float a, float b); |
162 | int __gtsf2(float a, float b); |
163 | int __gtdf2(double a, double b); |
163 | int __gtdf2(double a, double b); |
164 | int __gttf2(long double a, long double b); |
164 | int __gttf2(long double a, long double b); |
165 | 165 | ||
166 | /* Not implemented yet*/ |
166 | /* Not implemented yet*/ |
167 | float __powisf2(float a, int b); |
167 | float __powisf2(float a, int b); |
168 | 168 | ||
169 | #endif |
169 | #endif |
170 | 170 | ||
171 | 171 | ||
172 | /** @} |
172 | /** @} |
173 | */ |
173 | */ |
174 | 174 | ||
175 | 175 |