1$NetBSD: README.NetBSD,v 1.2 2002/03/24 23:04:03 bjh21 Exp $
2
3
4Changes at initial import...ross@netbsd.org
5
6  o  WARNS=2 fixes
7  o  source reorganized with arch/
8  o  <sys/endian.h> conversion
9  o  <inttypes.h> conversion
10  o  <ieeefp.h> conversion
11  o  <asm.h> conversion
12  o  the previously target-specific softfloat.h and milieu.h made mostly
13     generic. Still some work to do with default NaN bitpatterns, endian,
14     and arm/fpa-DEMANGLE issues.
15  o  arch/i386/systfloat.S extended to handle:
16	int32_t syst_floatx80_to_int32_round_to_zero(floatx80)
17	int64_t syst_floatx80_to_int64_round_to_zero(floatx80)
18  o  LONG_DOUBLE_IS_FLOATX80 was used to enable both the C module system
19     access ops and the FLOATX80 tests, all of which also required FLOATX80.
20     Besides being rundundant, this made it impossible to use the asm module
21     for i386 which the package actually comes with and also made it
22     impossible to test FLOATX80 ops without compiler support even if the
23     machine actually does them.  While this is arguably OK for a regression
24     test, the two cases are obviously different. Now, the tests (which
25     don't actually require any compiler-understood extended type) are
26     always run just by defining FLOATX80. If LONG_DOUBLE_IS_FLOATX80 is
27     also defined, then the C system ops are also enabled. To switch back
28     and forth, you modify only the arch/${MACHINE_ARCH}/Makefile.inc to
29     do the cpp def and add or remove systfloat.S. For regression testing,
30     it's better in C, but for testing the test itself or verifying a
31     regression, the .S module is a better reference case.
32
33     A similar change should probably be made for LONG_DOUBLE_IS_FLOAT128,
34     but we can't test that yet.
35
36     The basic rules:
37	LONG_DOUBLE_IS_FLOAT{X80,128}
38		define if you do not have a .S file and do have compiler
39		support, or have both and want to use the compiled version
40		(but then it may be necessary to remove the .S file or add
41		an ifndef to it)
42	FLOAT{X80,128}
43		define if you have either HW or SW support and want it tested
44
45    And to confuse things further: the .S files for i386 appear to have been
46    originally created by compiling C code with -S, at least as a start.
47
48    You can see some of the price of ANSI+IEEE in these files: a simple
49    conversion from floatxx to intxx requires storing, modifying, loading,
50    and restoring  the modes on each conversion in order to get a specific
51    round, thanks to the four IEEE-mandated options. A pipeline/peephole
52    pass can no doubt fix this up within one function, but not if other
53    arithmetic is done in between.
54