- 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
- move va_list type detection under #ifdef as it's rarely needed anyway
- allow up to 254 characters in a string literal
- generate a warning when an integer is passed instead of a pointer (and
vice versa) as a function parameter (pass -Wall for this)
- when printing an unexpected token, print identifier tokens instead of
'<tokIdent>'
- fix: allow most control characters inside '' and ""
- fix handling of -I<path> and -SI<path>
- switch() now supports Duff's device
- for() now supports declarations in its first clause as in C99/C++