fix asmtest (somehow), update Makefiles
This commit is contained in:
parent
0085c648f6
commit
045cff28fe
3 changed files with 14 additions and 9 deletions
6
Makefile
6
Makefile
|
|
@ -265,12 +265,16 @@ tar:
|
||||||
test clean:
|
test clean:
|
||||||
$(MAKE) -C tests $@
|
$(MAKE) -C tests $@
|
||||||
|
|
||||||
|
config.mak:
|
||||||
|
@echo Running configure ...
|
||||||
|
@./configure
|
||||||
|
|
||||||
# clean
|
# clean
|
||||||
clean: local_clean
|
clean: local_clean
|
||||||
local_clean:
|
local_clean:
|
||||||
rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.out libtcc_test$(EXESUF)
|
rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.out libtcc_test$(EXESUF)
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -vf config.h config.mak config.texi tcc.1 tcc-doc.html
|
rm -vf config.h config.mak config.texi tcc.1
|
||||||
|
|
||||||
endif # ifeq ($(TOP),.)
|
endif # ifeq ($(TOP),.)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
TESTS = libtest test3
|
TESTS = libtest test3
|
||||||
|
|
||||||
# these should work too
|
# these should work too
|
||||||
# TESTS += test1 test2 speed btest
|
# TESTS += test1 test2 speedtest btest
|
||||||
|
|
||||||
# these don't work as they should
|
# these don't work as they should
|
||||||
# TESTS += test4 asmtest
|
# TESTS += test4 asmtest
|
||||||
|
|
@ -23,6 +23,7 @@ all test : $(TESTS)
|
||||||
|
|
||||||
# make sure that tcc exists
|
# make sure that tcc exists
|
||||||
$(TESTS) : ../tcc
|
$(TESTS) : ../tcc
|
||||||
|
|
||||||
../tcc ../libtcc.a :
|
../tcc ../libtcc.a :
|
||||||
$(MAKE) -C ..
|
$(MAKE) -C ..
|
||||||
|
|
||||||
|
|
@ -104,7 +105,7 @@ btest: boundtest.c
|
||||||
echo; echo Bound test OK
|
echo; echo Bound test OK
|
||||||
|
|
||||||
# speed test
|
# speed test
|
||||||
speed: ex2 ex3
|
speedtest: ex2 ex3
|
||||||
@echo ------------ $@ ------------
|
@echo ------------ $@ ------------
|
||||||
time ./ex2 1238 2 3 4 10 13 4
|
time ./ex2 1238 2 3 4 10 13 4
|
||||||
time $(TCC) -run ../examples/ex2.c 1238 2 3 4 10 13 4
|
time $(TCC) -run ../examples/ex2.c 1238 2 3 4 10 13 4
|
||||||
|
|
@ -116,13 +117,13 @@ ex%: ../examples/ex%.c
|
||||||
|
|
||||||
# tiny assembler testing
|
# tiny assembler testing
|
||||||
asmtest.ref: asmtest.S
|
asmtest.ref: asmtest.S
|
||||||
$(CC) -o asmtest.ref.o -c asmtest.S
|
$(CC) -Wa,-W -o asmtest.ref.o -c asmtest.S
|
||||||
objdump -D asmtest.ref.o > $@
|
objdump -D asmtest.ref.o > asmtest.ref
|
||||||
|
|
||||||
asmtest: asmtest.ref
|
asmtest: asmtest.ref
|
||||||
@echo ------------ $@ ------------
|
@echo ------------ $@ ------------
|
||||||
$(TCC) -c asmtest.S
|
$(TCC) -c asmtest.S
|
||||||
objdump -D asmtest.o > $@
|
objdump -D asmtest.o > asmtest.out
|
||||||
@if diff -u --ignore-matching-lines="file format" asmtest.ref asmtest.out ; then echo "ASM Auto Test OK"; fi
|
@if diff -u --ignore-matching-lines="file format" asmtest.ref asmtest.out ; then echo "ASM Auto Test OK"; fi
|
||||||
|
|
||||||
# targets for development
|
# targets for development
|
||||||
|
|
|
||||||
|
|
@ -341,9 +341,9 @@ L3:
|
||||||
fnstcw 0x1002
|
fnstcw 0x1002
|
||||||
fstcw 0x1002
|
fstcw 0x1002
|
||||||
fnstsw 0x1004
|
fnstsw 0x1004
|
||||||
fnstsw %eax
|
fnstsw (%eax)
|
||||||
fstsw 0x1004
|
fstsw 0x1004
|
||||||
fstsw %eax
|
fstsw (%eax)
|
||||||
fnclex
|
fnclex
|
||||||
fclex
|
fclex
|
||||||
fnstenv 0x1000
|
fnstenv 0x1000
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue