Changeset 2416085 in mainline
- Timestamp:
- 2012-09-07T13:59:45Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ecd991a
- Parents:
- 77f91fe
- Location:
- uspace/lib/softfloat
- Files:
-
- 1 edited
- 19 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/softfloat/Makefile
r77f91fe r2416085 29 29 30 30 USPACE_PREFIX = ../.. 31 EXTRA_CFLAGS = -Iinclude32 31 LIBRARY = libsoftfloat 33 32 34 33 SOURCES = \ 35 generic/add.c \36 generic/common.c \37 generic/comparison.c \38 generic/conversion.c \39 generic/div.c \40 generic/mul.c \41 generic/other.c \42 generic/softfloat.c \43 generic/sub.c34 softfloat.c \ 35 common.c \ 36 add.c \ 37 sub.c \ 38 div.c \ 39 mul.c \ 40 comparison.c \ 41 conversion.c \ 42 other.c 44 43 45 44 include $(USPACE_PREFIX)/Makefile.common -
uspace/lib/softfloat/add.c
r77f91fe r2416085 34 34 */ 35 35 36 #include <sftypes.h>37 #include <add.h>38 #include <comparison.h>39 #include <common.h>36 #include "sftypes.h" 37 #include "add.h" 38 #include "comparison.h" 39 #include "common.h" 40 40 41 41 /** Add two single-precision floats with the same sign. -
uspace/lib/softfloat/common.c
r77f91fe r2416085 34 34 */ 35 35 36 #include <sftypes.h>37 #include <common.h>36 #include "sftypes.h" 37 #include "common.h" 38 38 39 39 /* Table for fast leading zeroes counting. */ … … 57 57 }; 58 58 59 /** 59 /** 60 60 * Take fraction shifted by 10 bits to the left, round it, normalize it 61 61 * and detect exceptions … … 75 75 while ((cexp > 0) && (cfrac) && 76 76 (!(cfrac & (FLOAT64_HIDDEN_BIT_MASK << (64 - FLOAT64_FRACTION_SIZE - 1))))) { 77 cexp--; 77 cexp--; 78 78 cfrac <<= 1; 79 79 /* TODO: fix underflow */ … … 110 110 ++cexp; 111 111 cfrac >>= 1; 112 } 112 } 113 113 114 114 /* check overflow */ -
uspace/lib/softfloat/common.h
r77f91fe r2416085 37 37 #define __COMMON_H__ 38 38 39 #include <sftypes.h>39 #include "sftypes.h" 40 40 41 41 extern float64 finish_float64(int32_t, uint64_t, char); -
uspace/lib/softfloat/comparison.c
r77f91fe r2416085 34 34 */ 35 35 36 #include <sftypes.h>37 #include <comparison.h>38 #include <common.h>36 #include "sftypes.h" 37 #include "comparison.h" 38 #include "common.h" 39 39 40 40 /** -
uspace/lib/softfloat/conversion.c
r77f91fe r2416085 34 34 */ 35 35 36 #include <sftypes.h>37 #include <conversion.h>38 #include <comparison.h>39 #include <common.h>36 #include "sftypes.h" 37 #include "conversion.h" 38 #include "comparison.h" 39 #include "common.h" 40 40 41 41 float64 float32_to_float64(float32 a) -
uspace/lib/softfloat/div.c
r77f91fe r2416085 34 34 */ 35 35 36 #include <sftypes.h>37 #include <add.h>38 #include <div.h>39 #include <comparison.h>40 #include <mul.h>41 #include <common.h>36 #include "sftypes.h" 37 #include "add.h" 38 #include "div.h" 39 #include "comparison.h" 40 #include "mul.h" 41 #include "common.h" 42 42 43 43 /** Divide two single-precision floats. -
uspace/lib/softfloat/mul.c
r77f91fe r2416085 34 34 */ 35 35 36 #include <sftypes.h>37 #include <mul.h>38 #include <comparison.h>39 #include <common.h>36 #include "sftypes.h" 37 #include "mul.h" 38 #include "comparison.h" 39 #include "common.h" 40 40 41 41 /** Multiply two single-precision floats. -
uspace/lib/softfloat/softfloat.c
r77f91fe r2416085 36 36 */ 37 37 38 #include <softfloat.h> 39 #include <sftypes.h> 40 41 #include <add.h> 42 #include <sub.h> 43 #include <mul.h> 44 #include <div.h> 45 46 #include <conversion.h> 47 #include <comparison.h> 48 #include <other.h> 38 #include "softfloat.h" 39 #include "sftypes.h" 40 #include "add.h" 41 #include "sub.h" 42 #include "mul.h" 43 #include "div.h" 44 #include "conversion.h" 45 #include "comparison.h" 46 #include "other.h" 49 47 50 48 /* Arithmetic functions */ … … 1277 1275 } 1278 1276 1277 int __aeabi_f2iz(float a) 1278 { 1279 return __fixsfsi(a); 1280 } 1281 1279 1282 int __aeabi_d2iz(double a) 1280 1283 { … … 1300 1303 { 1301 1304 return __ltdf2(a, b); 1305 } 1306 1307 int __aeabi_dcmpeq(double a, double b) 1308 { 1309 return __eqdf2(a, b); 1310 } 1311 1312 float __aeabi_fadd(float a, float b) 1313 { 1314 return __addsf3(a, b); 1315 } 1316 1317 float __aeabi_fsub(float a, float b) 1318 { 1319 return __subsf3(a, b); 1320 } 1321 1322 float __aeabi_fmul(float a, float b) 1323 { 1324 return __mulsf3(a, b); 1325 } 1326 1327 float __aeabi_fdiv(float a, float b) 1328 { 1329 return __divsf3(a, b); 1302 1330 } 1303 1331 -
uspace/lib/softfloat/softfloat.h
r77f91fe r2416085 207 207 extern double __aeabi_ui2d(unsigned int); 208 208 extern unsigned int __aeabi_d2uiz(double); 209 210 extern int __aeabi_f2iz(float); 209 211 extern int __aeabi_d2iz(double); 210 212 … … 212 214 extern int __aeabi_dcmpgt(double, double); 213 215 extern int __aeabi_dcmplt(double, double); 216 extern int __aeabi_dcmpeq(double, double); 217 218 extern float __aeabi_fadd(float, float); 219 extern float __aeabi_fsub(float, float); 220 extern float __aeabi_fmul(float, float); 221 extern float __aeabi_fdiv(float, float); 214 222 215 223 extern double __aeabi_dadd(double, double); -
uspace/lib/softfloat/sub.c
r77f91fe r2416085 34 34 */ 35 35 36 #include <sftypes.h>37 #include <sub.h>38 #include <comparison.h>39 #include <common.h>36 #include "sftypes.h" 37 #include "sub.h" 38 #include "comparison.h" 39 #include "common.h" 40 40 41 41 /** Subtract two single-precision floats with the same sign.
Note:
See TracChangeset
for help on using the changeset viewer.