- type specifiers may occur in any order
(e.g. "unsigned short int" and "int short unsigned")
- use .rodata/.rdata section for string literals
- arbitrary length string literals (hooray!)
- better concatenation of adjacent string literals
(now works even across preprocessor directives)
Support .bss section
- -nobss option in smlrc: use .data instead of .bss as before
- take advantage of .bss in smlrc (put a large array into it)
Remove dead/useless code
Remove useless/rarely used features/options:
-use-gp (MIPS)
-flat16/-flat32 (x86)
-seg16t (x86), -seg16 is now the default
-ctor-fxn
Add/change:
- use EXIT_FAILURE=1 instead of -1 in smlrc when aborting
due to an error
- properly sign-/zero-extend returned values, e.g. the following
function must return 255 and not -1:
unsigned char f(void) { return -1; }
- properly decay arrays on the left side of ->, e.g. the following must
compile:
{
struct {char c;} s[1];
s[0].c = 'a'; putchar(s[0].c);
(s+0)->c = 'b'; putchar(s[0].c);
(*s).c = 'c'; putchar(s[0].c);
s->c = 'd'; putchar(s[0].c);
putchar('\n');
}
Also:
- support structure passing/returning by value (x86 only)
- properly sign-/zero-extend returned values, e.g. the following
function must return 255 and not -1:
unsigned char f(void) { return -1; }
- properly decay arrays on the left side of ->, e.g. the following must
compile:
{
struct {char c;} s[1];
s[0].c = 'a'; putchar(s[0].c);
(s+0)->c = 'b'; putchar(s[0].c);
(*s).c = 'c'; putchar(s[0].c);
s->c = 'd'; putchar(s[0].c);
putchar('\n');
}
WF32 board by itself already has a microSD socket.
It's useless for RetroBSD though, as it is not connected to any
of available SPI ports (must use GPIO instead).
Fortunately, a cheap shield is widely available, which adds a microSD slot
connected to SPI2 pins.
Improvements:
- use registers more efficiently
- eliminate some register copies and stack manipulations
- promote left operands to right immediate operands
- improve simple assignments to auto/static vars
- use bltz, blez, bgtz, bgez
- change mul/divu (by powers of 2) to sll/srl/and
- use seb, seh for sign extension instead of sll/sra
- overall generate a bit tighter, faster and more readable asm code
Fixes:
- >>= should be unsigned when the left operand is unsigned int.
The right operand isn't important here.
- very subtle bug in e.g. void f(){int a; &a+1;/*wrong value of &a+1*/}
Other:
- include stdarg.c and skeleton.c in /share/example/Makefile