Simplify flt_arith now that mantissa uses uint32_t.
authorGeorge Koehler <xkernigh@netscape.net>
Sun, 6 Nov 2016 01:29:03 +0000 (21:29 -0400)
committerGeorge Koehler <xkernigh@netscape.net>
Sun, 6 Nov 2016 01:51:53 +0000 (21:51 -0400)
commitdaeeb5aca3a18ff8e240a534bad1f0941523cf9c
tree72b6ec0e0ed8d3a994d1ebdbb0616791ceef6f54
parent3bb41d391038f56b74bd5e34a820d31a4dbd658f
Simplify flt_arith now that mantissa uses uint32_t.

It seems that someone wanted to build flt_arith with a compiler that
had long but not unsigned long.  This required extra code to
accomplish unsigned right shift, unsigned division, and unsigned
comparison using the signed operations.  Now that we use uint32_t, we
can simply use the unsigned operations and remove the ucmp() function.
We have similar code in mach/proto/fp/ and in
lang/cem/libcc.ansi/stdlib/ext_comp.c where we use the unsigned
operations.

Some long variables become uint32_t, and some masks with 0xFFFFFFFF
disappear because uint32_t has only 32 bits.

Update flt_arith.3 to show that mantissa uses uint32_t.

Provide a target to install modules/src/flt_arith/test.c as flt_test
so I can run the tests.
modules/src/flt_arith/b64_add.c
modules/src/flt_arith/b64_sft.c
modules/src/flt_arith/build.lua
modules/src/flt_arith/flt_add.c
modules/src/flt_arith/flt_arith.3
modules/src/flt_arith/flt_div.c
modules/src/flt_arith/flt_misc.h
modules/src/flt_arith/flt_mul.c
modules/src/flt_arith/flt_nrm.c
modules/src/flt_arith/test.c
modules/src/flt_arith/ucmp.c [deleted file]