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