Commit graph

7 commits

Author SHA1 Message Date
George Koehler daeeb5aca3 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.
2016-11-05 21:51:53 -04:00
George Koehler 5c62ec2d8f Assume ANSI C in modules/src/flt_arith
Remove the #include "ansi.h" and always use the prototypes.
2016-11-05 16:24:18 -04:00
dtrg 6073ee934e Rationalised use of #includes to be more standards-compliant. 2006-07-19 14:09:05 +00:00
ceriel 5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
ceriel 11d4fdf6e0 Added prototyping stuff 1993-11-10 11:14:28 +00:00
ceriel ab8dcfa134 ANSI C fixes 1993-10-21 12:50:58 +00:00
ceriel 9a294d4821 Changed name of include file 1991-02-19 13:53:04 +00:00