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
262262 rm -rf /tmp/$(TCC-VERSION)
263263
264264 # in tests subdir
265−test clean :
265+test clean:
266266 $(MAKE) -C tests $@
267267
268+config.mak:
269+ @echo Running configure ...
270+ @./configure
271+
268272 # clean
269273 clean: local_clean
270274 local_clean:
271275 rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.out libtcc_test$(EXESUF)
272276
273277 distclean: clean
274− rm -vf config.h config.mak config.texi tcc.1 tcc-doc.html
278+ rm -vf config.h config.mak config.texi tcc.1
275279
276280 endif # ifeq ($(TOP),.)
tests/Makefile+6−5
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 TESTS = libtest test3
77
88 # these should work too
9−# TESTS += test1 test2 speed btest
9+# TESTS += test1 test2 speedtest btest
1010
1111 # these don't work as they should
1212 # TESTS += test4 asmtest
@@ -23,6 +23,7 @@ all test : $(TESTS) · 10 unmodified lines
2323
2424 # make sure that tcc exists
2525 $(TESTS) : ../tcc
26+
2627 ../tcc ../libtcc.a :
2728 $(MAKE) -C ..
2829
@@ -104,7 +105,7 @@ btest: boundtest.c · 75 unmodified lines
104105 echo; echo Bound test OK
105106
106107 # speed test
107−speed: ex2 ex3
108+speedtest: ex2 ex3
108109 @echo ------------ $@ ------------
109110 time ./ex2 1238 2 3 4 10 13 4
110111 time $(TCC) -run ../examples/ex2.c 1238 2 3 4 10 13 4
@@ -116,13 +117,13 @@ ex%: ../examples/ex%.c · 5 unmodified lines
116117
117118 # tiny assembler testing
118119 asmtest.ref: asmtest.S
119− $(CC) -o asmtest.ref.o -c asmtest.S
120− objdump -D asmtest.ref.o > $@
120+ $(CC) -Wa,-W -o asmtest.ref.o -c asmtest.S
121+ objdump -D asmtest.ref.o > asmtest.ref
121122
122123 asmtest: asmtest.ref
123124 @echo ------------ $@ ------------
124125 $(TCC) -c asmtest.S
125− objdump -D asmtest.o > $@
126+ objdump -D asmtest.o > asmtest.out
126127 @if diff -u --ignore-matching-lines="file format" asmtest.ref asmtest.out ; then echo "ASM Auto Test OK"; fi
127128
128129 # targets for development
tests/asmtest.S+2−2
@@ -341,9 +341,9 @@ L3: · 340 unmodified lines
341341 fnstcw 0x1002
342342 fstcw 0x1002
343343 fnstsw 0x1004
344− fnstsw %eax
344+ fnstsw (%eax)
345345 fstsw 0x1004
346− fstsw %eax
346+ fstsw (%eax)
347347 fnclex
348348 fclex
349349 fnstenv 0x1000