- Smaller C: fix a bug in __func__ introduced with
float-related changes
- make *printf() print floats greater than 1e25
- make *printf() print the plus sign when the format
includes "+", e.g. printf("%+f\n", 1.0);
- clean up and complete prototypes in <math.h>
- remove non-standard HUGE and LOGHUGE from <math.h>
- add HUGE_VAL to <math.h>
- express some hard-coded limits in terms of constants
from <float.h>
- uncomment prototypes of several floating point
conversion functions in <stdlib.h> for Smaller C
double is an alias for float. IOW, only 32-bit
single precision floats are supported. This isn't
conformant, but OK for some embedded systems (e.g.
RetroBSD) and simple compilers like this.
Also, the following operators are not supported with
floats at the moment: ++, --, +=, -=, *=, /=.
But +, -, *, /, =, ||, &&, ?:, !, comparison, casts,
if/while/for are OK.
Also:
- A few bugfixes in virtualmips
- Compile Smaller C (smlrc) using MIPS16e
(this frees up ~20KB of space for smlrc improvements)
TBD:
- MIPS16e disassembler in virtualmips
Delete device names from all the drivers.
Move device inslude files from include/sys to include/machine directory.
Only include files which have something useful for user layer
(like special ioctls codes) should be placed into sys.
All architectures:
- "return" statement at function's end doesn't jump to immediately
following epilog anymore
- zero and non-zero constants are recognized in conditional
expressions of "if", "do/while" and "for" statements, no code
generated to evaluate these constant conditions and related
unnecessary jumps aren't generated anymore either
- in "for (clause-1; expr-2; expr-3) body", "expr-3" and "body" are
now reordered to the more natural code flow "body expr-3", thereby
getting rid of unnecessary jumps
MIPS code generator:
- function prologue/epilogue shortened further
- RA is not explicitly saved/restored in leaf functions
- assignment of 0 (e.g. "int a = 0;") is done from register 0
directly, avoiding a load of a constant
- Update license text (remove irrelevant FreeBSD references)
- Update root readme.txt
- Improve prologue/epilogue generation
Don't generate unnecessary jumps back and forth to/from
"sub sp, size_of_locals".
Instead, with the help of fgetpos()/fsetpos()
initially write ";sub sp, 0" and then, when
the size is finally known, go back and overwrite it with
" sub sp, size_of_locals".
gcc 5.0 defaults to -std=gnu11 meaning code which relies on implicit
ints will no longer compile. Passing -std=gnu89 restores the default
but causes problems because the system headers are written in gnu11.
Using -idirafter instead of -nostdinc resolves all problems and should
be compatible with old GCC versions (and clang).