18 Commits

Author SHA1 Message Date
Sergey
163dcbd961 Branch "uflash" imported from GoogleCode. 2015-03-21 14:11:41 -07:00
Sergey
7e4b86d135 Branch "sdram" imported from GoogleCode. 2015-03-21 14:08:32 -07:00
alex
b1f67fbca0 SmallerC: generate smaller & faster code; bugfixes
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
2014-12-29 16:28:56 -08:00
alex
00269e9387 Smaller C fixes and improvements:
- 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++
2014-12-06 16:18:17 -08:00
alex
f57cc446b0 Remove no longer applicable comment. 2014-10-19 00:53:29 -07:00
alex
b18ce0aa87 Fix MIPS code generation for -= and postfix --.
Also convert most of Small C sample programs to Smaller C.
2014-10-19 00:22:44 -07:00
Serge Vakulenko
a8d9b3d01f Makefiles updated for man sources. 2014-09-25 19:31:55 -07:00
Serge Vakulenko
25bcc79a69 Merge branch 'master' into games.
Conflicts:
	Makefile
2014-09-08 11:31:12 -07:00
Sergey
b3abe580bd Added emg editor from github.com/ibara/emg. 2014-05-24 19:37:02 -07:00
Sergey
d8305bc374 Added words file - needed for games. 2014-05-09 21:00:43 -07:00
Serge Vakulenko
a0d072f271 Skeleton: copyright updated. 2014-05-05 12:00:20 -07:00
Serge Vakulenko
f40da13b35 C skeleton simplified. 2014-05-05 11:45:12 -07:00
Serge Vakulenko
19cf54c0c1 Copyright for skeleton updated. 2014-05-05 11:29:53 -07:00
Serge Vakulenko
ed92365a4c Added a skeleton of generic C program. 2014-05-05 11:19:42 -07:00
Serge Vakulenko
6f8e71c1b8 Include files modified for compatibility with SmallerC.
Fixed bug in C preprocessor: buffer size reduced to avoid allocation failure.
Added option -v for smlrc.
New example stdarg.c: a demo of function with variable arguments.
2014-05-02 22:00:30 -07:00
Sergey
d404fca13a Fixed bug in assembler: incorrect offset of far symbols in LUI instruction.
Added .gitignore files for most subdirs.
2014-04-18 01:12:49 -07:00
Matt Jenkins
0c86462977 Fixed for git repo compilation 2014-04-09 15:07:21 +01:00
Matt Jenkins
895f96d2f7 Initial Import from SVN 2014-04-09 14:27:18 +01:00