File: README

package info (click to toggle)
brickos 0.9.0-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,700 kB
  • ctags: 1,727
  • sloc: ansic: 9,139; cpp: 860; makefile: 717; asm: 693; sh: 123; perl: 61
file content (119 lines) | stat: -rw-r--r-- 3,218 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
Libfloat.a (Dec 16 2000 release)
Written by Kekoa Proudfoot
Released May 27, 1999


INTRODUCTION

Libfloat.a provides single precision floating point support for H8
processors.

Libfloat.a is a part of Librcx, which is distributed under the Mozilla
Public License.  Please see the file ../LICENSE for details.

Routines include:

   addsf3:
       single precision floating point add

   subsf3:
       single precision floating point subtract

   mulsf3:
       single precision floating point multiply

   divsf3:
       single precision floating point divide

   negsf2:
       single precision floating point negate

   cmpsf2, eqsf2, nesf2, ltsf2, lesf2, gtsf2, gesf2:
       single precision floating point compare, all returning -1, 0, or 1
       comparisons differ in what they return if input is NaN (not a number)

   fixsfsi:
       conversion from single precision floating point to signed long integer

   fixunssfsi:
       conversion from single precision floating point to unsigned long integer

   floatsisf:
       conversion from signed long integer to single precision floating point

   ufloatsisf:
       conversion from unsigned long integer to single precision floating point


USAGE NOTES

GCC will use all of these functions except ufloatsisf and perhaps also
cmpsf2.  The ufloatsisf routine is specifically intended to be used to
override GCC's built-in support for converting unsigned long integers to
floating point.  GCC performs each such conversion as an invocation of
floatsisf wrapped in additional support code, and because the support code
is lengthy, each conversion requires a large amount of code space.
Alternatively, an invocation of the ufloatsisf routine is both smaller and
faster.

You can override GCC's support for conversion from unsigned long integer to
single precision floating point as follows:

   - declare the replacement conversion routine:

        extern float __ufloatsisf (unsigned long value);

   - call the routine in place of a cast from unsigned long to float:

        unsigned long ulvalue;
        float fvalue;

        ...

        fvalue = __ufloatsisf(ulvalue);

You do not need to use ufloatsisf for converting unsigned short, unsigned
int, or unsigned char types, since GCC's support for these conversions is
already reasonably efficient.

The floating point support implemented in this directory conforms to a
subset of IEEE 754.  In particular, this implementation does not support
traps, signalling NaNs, status flags, or rounding modes other than round to
even, and the only functions implemented are those directly accessible in C
using standard operators.

The total size of all routines in the library is currently 1124 bytes.

A few possible optimizations were left out of this release and may be
incorporated into a later version of this library.


ACKNOWLEDGEMENTS

- Kieran Elby sent in a "0 - x" bug report for subsf3


VERSION HISTORY

May 27 1999

- initial release
- total size: 1142 bytes

Dec 16 2000

- fixed Kieran's "0 - x" bug
- simplified negsf2
- total size: 1124 bytes


BUG REPORTS

Any bugs or problems with this library should be reported to:

    kekoa@graphics.stanford.edu

---
Kekoa Proudfoot
December 16, 2000