History

fix asmtest (somehow), update Makefiles

grischka committed 17 years ago

Commit 045cff21 parent 0085c643 files · +14 −9Browse files

Unified · Split

3 files
  1. Makefile +6 −2
  2. tests/Makefile +6 −5
  3. tests/asmtest.S +2 −2
Makefile+6−2
@@ -262,15 +262,19 @@ tar: · 261 unmodified lines
262 rm -rf /tmp/$(TCC-VERSION)262 rm -rf /tmp/$(TCC-VERSION)
263 263
264# in tests subdir264# in tests subdir
265test clean :265test clean:
266 $(MAKE) -C tests $@266 $(MAKE) -C tests $@
267 267
268config.mak:
269 @echo Running configure ...
270 @./configure
271
268# clean272# clean
269clean: local_clean273clean: local_clean
270local_clean:274local_clean:
271 rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.out libtcc_test$(EXESUF)275 rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.out libtcc_test$(EXESUF)
272 276
273distclean: clean277distclean: clean
274 rm -vf config.h config.mak config.texi tcc.1 tcc-doc.html278 rm -vf config.h config.mak config.texi tcc.1
275 279
276endif # ifeq ($(TOP),.)280endif # ifeq ($(TOP),.)
tests/Makefile+6−5
@@ -6,7 +6,7 @@ · 5 unmodified lines
6TESTS = libtest test36TESTS = libtest test3
7 7
8# these should work too8# these should work too
9# TESTS += test1 test2 speed btest9# TESTS += test1 test2 speedtest btest
10 10
11# these don't work as they should11# these don't work as they should
12# TESTS += test4 asmtest12# TESTS += test4 asmtest
@@ -23,6 +23,7 @@ all test : $(TESTS) · 10 unmodified lines
23 23
24# make sure that tcc exists24# make sure that tcc exists
25$(TESTS) : ../tcc25$(TESTS) : ../tcc
26
26../tcc ../libtcc.a :27../tcc ../libtcc.a :
27 $(MAKE) -C ..28 $(MAKE) -C ..
28 29
@@ -104,7 +105,7 @@ btest: boundtest.c · 75 unmodified lines
104 echo; echo Bound test OK105 echo; echo Bound test OK
105 106
106# speed test107# speed test
107speed: ex2 ex3108speedtest: ex2 ex3
108 @echo ------------ $@ ------------109 @echo ------------ $@ ------------
109 time ./ex2 1238 2 3 4 10 13 4110 time ./ex2 1238 2 3 4 10 13 4
110 time $(TCC) -run ../examples/ex2.c 1238 2 3 4 10 13 4111 time $(TCC) -run ../examples/ex2.c 1238 2 3 4 10 13 4
@@ -116,13 +117,13 @@ ex%: ../examples/ex%.c · 5 unmodified lines
116 117
117# tiny assembler testing118# tiny assembler testing
118asmtest.ref: asmtest.S119asmtest.ref: asmtest.S
119 $(CC) -o asmtest.ref.o -c asmtest.S120 $(CC) -Wa,-W -o asmtest.ref.o -c asmtest.S
120 objdump -D asmtest.ref.o > $@121 objdump -D asmtest.ref.o > asmtest.ref
121 122
122asmtest: asmtest.ref123asmtest: asmtest.ref
123 @echo ------------ $@ ------------124 @echo ------------ $@ ------------
124 $(TCC) -c asmtest.S125 $(TCC) -c asmtest.S
125 objdump -D asmtest.o > $@126 objdump -D asmtest.o > asmtest.out
126 @if diff -u --ignore-matching-lines="file format" asmtest.ref asmtest.out ; then echo "ASM Auto Test OK"; fi127 @if diff -u --ignore-matching-lines="file format" asmtest.ref asmtest.out ; then echo "ASM Auto Test OK"; fi
127 128
128# targets for development129# targets for development
tests/asmtest.S+2−2
@@ -341,9 +341,9 @@ L3: · 340 unmodified lines
341 fnstcw 0x1002341 fnstcw 0x1002
342 fstcw 0x1002342 fstcw 0x1002
343 fnstsw 0x1004343 fnstsw 0x1004
344 fnstsw %eax344 fnstsw (%eax)
345 fstsw 0x1004345 fstsw 0x1004
346 fstsw %eax346 fstsw (%eax)
347 fnclex347 fnclex
348 fclex348 fclex
349 fnstenv 0x1000349 fnstenv 0x1000