modified version of the old one which don't allow '.' in #define Identifiers. This allow correctly preprocess the following code in *.S #define SRC(y...) \ 9999: y; \ .section __ex_table, "a"; \ .long 9999b, 6001f ; \ // .previous SRC(1: movw (%esi), %bx) 6001: A test included.
Showing the changes to tests (4 of 8 files). Show all
Unified · Split
| @@ -73,7 +73,11 @@ DISAS = objdump -d · 72 unmodified lines | ||
| 73 | 73 | |
| 74 | 74 | # libtcc test |
| 75 | 75 | ifdef LIBTCC1 |
| 76 | − LIBTCC1:=$(TOP)/$(LIBTCC1) | |
| 76 | + ifdef CONFIG_WIN32 | |
| 77 | + LIBTCC1:=$(TOP)/win32/libtcc/libtcc.a | |
| 78 | + else | |
| 79 | + LIBTCC1:=$(TOP)/$(LIBTCC1) | |
| 80 | + endif | |
| 77 | 81 | endif |
| 78 | 82 | |
| 79 | 83 | all test : $(TESTS) |
| @@ -0,0 +1,8 @@ | ||
| 1 | +#define SRC(y...) \ | |
| 2 | + 9999: y; \ | |
| 3 | + .section __ex_table, "a"; \ | |
| 4 | + .long 9999b, 6001f ; \ | |
| 5 | + // .previous | |
| 6 | + | |
| 7 | + SRC(1: movw (%esi), %bx) | |
| 8 | +6001: | |
| @@ -0,0 +1,2 @@ | ||
| 1 | + 9999: 1: movw (%esi), %bx; .section __ex_table, "a"; .long 9999b, 6001f ; | |
| 2 | +6001: | |
| @@ -7,6 +7,7 @@ include $(TOP)/Makefile · 6 unmodified lines | ||
| 7 | 7 | |
| 8 | 8 | TCC = $(TOP)/tcc |
| 9 | 9 | TESTS = $(patsubst %.c,%.test,$(wildcard *.c)) |
| 10 | +TESTS += $(patsubst %.S,%.test,$(wildcard *.S)) | |
| 10 | 11 | |
| 11 | 12 | ifdef CONFIG_WIN32 |
| 12 | 13 | TCC = $(top_srcdir)/win32/tcc |
| @@ -20,10 +21,19 @@ all test : $(TESTS) · 7 unmodified lines | ||
| 20 | 21 | diff -Nu -b -B -I "^#" $(EXTRA_DIFF_OPTS) $*.expect $*.output \ |
| 21 | 22 | && rm -f $*.output |
| 22 | 23 | |
| 24 | +%.test: %.S %.expect | |
| 25 | + @echo PPTest $* ... | |
| 26 | + @$(TCC) -E -P $< >$*.output 2>&1 ; \ | |
| 27 | + diff -Nu -b -B -I "^#" $(EXTRA_DIFF_OPTS) $*.expect $*.output \ | |
| 28 | + && rm -f $*.output | |
| 29 | + | |
| 23 | 30 | # automatically generate .expect files with gcc: |
| 24 | −%.expect : | |
| 31 | +%.expect: %.c | |
| 25 | 32 | gcc -E -P $*.c >$*.expect 2>&1 |
| 26 | 33 | |
| 34 | +%.expect: %.S | |
| 35 | + gcc -E -P $*.S >$*.expect 2>&1 | |
| 36 | + | |
| 27 | 37 | # tell make not to delete |
| 28 | 38 | .PRECIOUS: %.expect |
| 29 | 39 | |