Debian Codegraph @

lib/float/README

raw
1 Libfloat.a (Dec 16 2000 release)
2 Written by Kekoa Proudfoot
3 Released May 27, 1999
4
5
6 INTRODUCTION
7
8 Libfloat.a provides single precision floating point support for H8
9 processors.
10
11 Libfloat.a is a part of Librcx, which is distributed under the Mozilla
12 Public License. Please see the file ../LICENSE for details.
13
14 Routines include:
15
16 addsf3:
17 single precision floating point add
18
19 subsf3:
20 single precision floating point subtract
21
22 mulsf3:
23 single precision floating point multiply
24
25 divsf3:
26 single precision floating point divide
27
28 negsf2:
29 single precision floating point negate
30
31 cmpsf2, eqsf2, nesf2, ltsf2, lesf2, gtsf2, gesf2:
32 single precision floating point compare, all returning -1, 0, or 1
33 comparisons differ in what they return if input is NaN (not a number)
34
35 fixsfsi:
36 conversion from single precision floating point to signed long integer
37
38 fixunssfsi:
39 conversion from single precision floating point to unsigned long integer
40
41 floatsisf:
42 conversion from signed long integer to single precision floating point
43
44 ufloatsisf:
45 conversion from unsigned long integer to single precision floating point
46
47
48 USAGE NOTES
49
50 GCC will use all of these functions except ufloatsisf and perhaps also
51 cmpsf2. The ufloatsisf routine is specifically intended to be used to
52 override GCC's built-in support for converting unsigned long integers to
53 floating point. GCC performs each such conversion as an invocation of
54 floatsisf wrapped in additional support code, and because the support code
55 is lengthy, each conversion requires a large amount of code space.
56 Alternatively, an invocation of the ufloatsisf routine is both smaller and
57 faster.
58
59 You can override GCC's support for conversion from unsigned long integer to
60 single precision floating point as follows:
61
62 - declare the replacement conversion routine:
63
64 extern float __ufloatsisf (unsigned long value);
65
66 - call the routine in place of a cast from unsigned long to float:
67
68 unsigned long ulvalue;
69 float fvalue;
70
71 ...
72
73 fvalue = __ufloatsisf(ulvalue);
74
75 You do not need to use ufloatsisf for converting unsigned short, unsigned
76 int, or unsigned char types, since GCC's support for these conversions is
77 already reasonably efficient.
78
79 The floating point support implemented in this directory conforms to a
80 subset of IEEE 754. In particular, this implementation does not support
81 traps, signalling NaNs, status flags, or rounding modes other than round to
82 even, and the only functions implemented are those directly accessible in C
83 using standard operators.
84
85 The total size of all routines in the library is currently 1124 bytes.
86
87 A few possible optimizations were left out of this release and may be
88 incorporated into a later version of this library.
89
90
91 ACKNOWLEDGEMENTS
92
93 - Kieran Elby sent in a "0 - x" bug report for subsf3
94
95
96 VERSION HISTORY
97
98 May 27 1999
99
100 - initial release
101 - total size: 1142 bytes
102
103 Dec 16 2000
104
105 - fixed Kieran's "0 - x" bug
106 - simplified negsf2
107 - total size: 1124 bytes
108
109
110 BUG REPORTS
111
112 Any bugs or problems with this library should be reported to:
113
114 [email protected]
115
116 ---
117 Kekoa Proudfoot
118 December 16, 2000
119