Files
retrobsd/share/example/Makefile
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

21 lines
309 B
Makefile

all: ashello echo chello stdarg skeleton
ashello: ashello.o
$(LD) ashello.o -o $@
chello: chello.o
$(CC) chello.o -o $@
echo: echo.o
$(LD) $@.o -o $@
stdarg: stdarg.o
$(CC) stdarg.o -o $@
skeleton: skeleton.o
$(CC) skeleton.o -o $@
clean:
rm -f *.o ashello echo chello stdarg skeleton *.dis *~