Mercurial > hg > CbC > old > device
changeset 476:034436187add
*** empty log message ***
author | kono |
---|---|
date | Tue, 08 Nov 2005 21:44:20 +0900 |
parents | ec4046c9d34f |
children | 308192c08e0a |
files | Makefile.linuxzaurus Makefile.mips mc-code-ia32.c |
diffstat | 3 files changed, 15 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.linuxzaurus Tue Nov 08 21:21:57 2005 +0900 +++ b/Makefile.linuxzaurus Tue Nov 08 21:44:20 2005 +0900 @@ -15,7 +15,7 @@ PRINTF= # printf.c CONVERTER=conv/c.o conv/null.o # conv/c2cbc.o conv/cbc2c.o -COMPLIB = mc-parse.o mc-codegen.o mc-switch.o mc-macro.o mc-tree.o +COMPLIB = mc-parse.o mc-codegen.o mc-switch.o mc-macro.o mc-tree.o mc-inline.o # CODE=mc-code-ia32.c CODE=mc-code-$(ARCH).c # @@ -163,11 +163,11 @@ clean : -rm -f mc mc-ia32 mc-powerpc mc-mips mc-arm *.bak *.s *.o *.cc mc mc1 mc2 a.out *~ core* */*.o *.bak test/*.s test/*.cc test/*.o test/*.bak test/*~ conv/*.s conv/*.cc conv/*.o conv/*.bak conv/*~ *.out */*.out *.i */*.i -mc1 : b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o $(CONVERTER) - $(CC) -g -o $@ $(PRINTF) b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o $(CONVERTER) +mc1 : b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o mc-inline.o $(CONVERTER) + $(CC) -g -o $@ $(PRINTF) b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o mc-inline.o $(CONVERTER) -mc2 : b00.s b01.s b02.s b03.s mc-macro.o $(CONVERTER) - $(CC) -g -o $@ $(PRINTF) b00.s b01.s b02.s b03.s b04.s mc-macro.o $(CONVERTER) +mc2 : b00.s b01.s b02.s b03.s mc-macro.o mc-inline.o $(CONVERTER) + $(CC) -g -o $@ $(PRINTF) b00.s b01.s b02.s b03.s b04.s mc-macro.o mc-inline.o $(CONVERTER) b00.s : mc-parse.c $(MC) ./$(MC) -s -ob00.s mc-parse.c
--- a/Makefile.mips Tue Nov 08 21:21:57 2005 +0900 +++ b/Makefile.mips Tue Nov 08 21:44:20 2005 +0900 @@ -163,11 +163,11 @@ clean : -rm -f mc mc-ia32 mc-powerpc mc-mips mc-arm *.bak *.s *.o *.cc mc mc1 mc2 a.out *~ core* */*.o *.bak test/*.s test/*.cc test/*.o test/*.bak test/*~ conv/*.s conv/*.cc conv/*.o conv/*.bak conv/*~ *.out */*.out *.i */*.i -mc1 : b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o $(CONVERTER) - $(CC) -g -o $@ $(PRINTF) b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o $(CONVERTER) +mc1 : b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o mc-inline.o $(CONVERTER) + $(CC) -g -o $@ $(PRINTF) b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o mc-inline.o $(CONVERTER) -mc2 : b00.s b01.s b02.s b03.s mc-macro.o $(CONVERTER) - $(CC) -g -o $@ $(PRINTF) b00.s b01.s b02.s b03.s b04.s mc-macro.o $(CONVERTER) +mc2 : b00.s b01.s b02.s b03.s mc-macro.o mc-inline.o $(CONVERTER) + $(CC) -g -o $@ $(PRINTF) b00.s b01.s b02.s b03.s b04.s mc-macro.o mc-inline.o $(CONVERTER) b00.s : mc-parse.c $(MC) ./$(MC) -s -ob00.s mc-parse.c
--- a/mc-code-ia32.c Tue Nov 08 21:21:57 2005 +0900 +++ b/mc-code-ia32.c Tue Nov 08 21:44:20 2005 +0900 @@ -1138,7 +1138,9 @@ printf("\tpopl %%edi\n"); printf("\tpopl %%esi\n"); if(length%4) { - emit_copy(from,to,length,offset+length/SIZE_OF_INT,0,det); + offset = offset+length/SIZE_OF_INT; + length=length%4; + emit_copy(from,to,length,offset,0,det); } } else { printf("\tmovl $%d,%%ecx\n",length/4); @@ -1147,7 +1149,9 @@ printf("\tpopl %%edi\n"); printf("\tpopl %%esi\n"); if(length%4) { - emit_copy(from,to,length,offset+length/SIZE_OF_INT,0,det); + offset = offset+length/SIZE_OF_INT; + length=length%4; + emit_copy(from,to,length,offset,0,det); } } }