Mercurial > hg > CbC > old > device
changeset 565:dbe0b9ac9f53
*** empty log message ***
author | kono |
---|---|
date | Wed, 11 Jan 2006 10:48:05 +0900 |
parents | 25f431685d80 |
children | ddc435b64fc8 |
files | Changes Makefile.linuxzaurus mc-code-arm.c stdio.h |
diffstat | 4 files changed, 56 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/Changes Tue Jan 10 16:30:43 2006 +0900 +++ b/Changes Wed Jan 11 10:48:05 2006 +0900 @@ -8148,3 +8148,21 @@ 良いはず。 う、あっさり、converter も動いたか。 + +あとは、parse tree mode と source generator from parse tree を +作れば良いわけね。 + +まぁ、converter は one path なんで限界はあるんだよね。もっと +簡単に出来るかと思ったけど、実際に動かしてみると、結構、 +だめだめ。-E は、簡単に作れるから作ってみたけど、やっぱり +変だよね。本体を2 pass にすることも可能だが、いろいろ +面倒か。と考えると、parse tree が結局楽か。 + + + + + + + + +
--- a/Makefile.linuxzaurus Tue Jan 10 16:30:43 2006 +0900 +++ b/Makefile.linuxzaurus Wed Jan 11 10:48:05 2006 +0900 @@ -31,6 +31,7 @@ mc-macro.c \ mc-parse.c mc-tree.c mc-switch.c mc-switch.h \ mc.h conv/c.c conv/c.h \ + mc-inline.h mc-inline.c \ conv/conv.h conv/convdef.h conv/null.c mc-powerpc : mc-code-powerpc.o $(COMPLIB) $(CONVERTER) @@ -45,21 +46,22 @@ mc-arm : mc-code-arm.o $(COMPLIB) $(CONVERTER) $(CC) $(LDFLAGS) -g mc-code-arm.o $(COMPLIB) $(CONVERTER) -o $@ -conv/conv.h: conv_func.tbl conv_func.pl - perl conv_func.pl -conv/convdef.h: conv_func.tbl conv_func.pl - perl conv_func.pl -conv/null.c: conv_func.tbl conv_func.pl - perl conv_func.pl +conv/conv.h: conv_func.tbl tools/conv_func.pl + perl tools/conv_func.pl +conv/convdef.h: conv_func.tbl tools/conv_func.pl + perl tools/conv_func.pl +conv/null.c: conv_func.tbl tools/conv_func.pl + perl tools/conv_func.pl mc.h-new: - perl mc-h-renum.pl mc.h > mc.h.1 + perl tools/mc-h-renum.pl mc.h > mc.h.1 mv mc.h.1 mc.h check-all: check-all-c check-all-code check-all-c: make check TARGET=test/basic + make check-inline TARGET=test/basic make check TARGET=test/call make check TARGET=test/fact0 make check TARGET=test/float @@ -88,12 +90,18 @@ make check TARGET=test/switch make check TARGET=test/strinit make check TARGET=test/code-gen-all + make check-inline TARGET=test/code-gen-all make check TARGET=test/bitfield make check TARGET=test/bitfield1 + make check-inline TARGET=test/bitfield1 make check TARGET=test/cext make check TARGET=test/const make check TARGET=test/void_code + make check TARGET=test/putenemy + make check TARGET=test/inline + make check TARGET=test/offset # make check TARGET=test/scope STDFLAG="-std=gnu99" +# make check-inline TARGET=test/scope STDFLAG="-std=gnu99" #MK =-make MK= check-all-code: @@ -104,42 +112,54 @@ make check-code$(MK) TARGET=test/fact make check-code$(MK) TARGET=test/goto make check-code$(MK) TARGET=test/test1 + make check-code$(MK) TARGET=test/tmpa make check-code$(MK) TARGET=test/tmp1 make check-code$(MK) TARGET=test/tmp2 make check-code$(MK) TARGET=test/tmp4 make check-code$(MK) TARGET=test/tmp6 - make check-code$(MK) TARGET=test/tmpa make check-code$(MK) TARGET=test/scope + make check-code$(MK) TARGET=test/too-long-argument check-nkf: - ( cd nkf203; $(CC) $(CFLAGS) $(CFLAGS1) -g -o nkf1 nkf.c utf8tbl.c ) + ( cd nkf203; $(CC) -g -o nkf1 nkf.c utf8tbl.c ) ( cd nkf203; ../mc-$(ARCH) -s nkf.c utf8tbl.c ) ( cd nkf203; $(CC) -g -o nkf nkf.s utf8tbl.s ) ( cd nkf203; perl test.pl ) # -./$(MC) -Itest/ -s $(TARGET).c -check: $(MC) $(TARGET).c - -gcc $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) +check: mc $(MC) $(TARGET).c + -$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) -./b.out > $(TARGET).gcc.out -./$(MC) -s $(TARGET).c - -gcc $(TARGET).s $(MLIB) + -$(CC) $(TARGET).s $(MLIB) -./a.out > $(TARGET).$(MC).out -diff $(TARGET).gcc.out $(TARGET).$(MC).out -check-code: $(MC) +check-inline: mc $(MC) $(TARGET).c + -$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) + -./b.out > $(TARGET).gcc.out + -./$(MC) -s -DINLINE=inline $(TARGET).c + -$(CC) $(TARGET).s $(MLIB) + -./a.out > $(TARGET).$(MC).out + -diff $(TARGET).gcc.out $(TARGET).$(MC).out + +check-code: mc $(MC) -./$(MC) -s $(TARGET).c - -gcc $(TARGET).s $(MLIB) + -$(CC) $(TARGET).s $(MLIB) -./a.out > $(TARGET).$(MC).out -diff $(TARGET).code-out $(TARGET).$(MC).out -check-code-make: $(MC) +check-code-make: mc $(MC) -./$(MC) -s $(TARGET).c - -gcc $(TARGET).s $(MLIB) + -$(CC) $(TARGET).s $(MLIB) -./a.out > $(TARGET).code-out test/code-gen-all.c: test/code-gen.pl test/code-gen.c perl test/code-gen.pl < test/code-gen.c > test/code-gen-all.c +incpri: + perl tools/incpri.pl test/*.c + tags: tags-$(ARCH) tags-$(ARCH): @@ -219,4 +239,3 @@ # DO NOT DELETE -
--- a/mc-code-arm.c Tue Jan 10 16:30:43 2006 +0900 +++ b/mc-code-arm.c Wed Jan 11 10:48:05 2006 +0900 @@ -2411,7 +2411,7 @@ int nargs=0,reg_arg=0,freg_arg=0; int t=caddr(e3); if(scalar(t)) { - nargs ++ ; reg_arg++; + nargs ++ ; reg_arg++; freg_arg++; } else if (t==LONGLONG||t==ULONGLONG||t==DOUBLE) { nargs ++ ; reg_arg++; nargs ++ ; reg_arg++;