# HG changeset patch # User kono # Date 1048442754 -32400 # Node ID 5f180dc8d84e0c9f535316c966599aff4c38772b # Parent b884271bcab2895510290d0ecb221e215d890e6c intel fix. diff -r b884271bcab2 -r 5f180dc8d84e .gdbinit --- a/.gdbinit Mon Mar 24 01:28:02 2003 +0900 +++ b/.gdbinit Mon Mar 24 03:05:54 2003 +0900 @@ -1,5 +1,5 @@ tb main -r -s test/basic.c +r -s test/tmp7.c define regs printf "pc =%08x lr =%08x r0 =%08x r1 =%08x r3= %08x r4= %08x\n",$pc,$lr,$r0,$r1,$r3,$r4 printf "r10=%08x r11=%08x r12=%08x r13=%08x r14=%08x r15=%08x\n",$r10,$r11,$r12,$r13,$r14,$r15 diff -r b884271bcab2 -r 5f180dc8d84e .gdbinit.powerpc --- a/.gdbinit.powerpc Mon Mar 24 01:28:02 2003 +0900 +++ b/.gdbinit.powerpc Mon Mar 24 03:05:54 2003 +0900 @@ -1,5 +1,5 @@ tb main -r -s mc-parse.c +r -s test/basic.c define regs printf "pc =%08x lr =%08x r0 =%08x r1 =%08x r3= %08x r4= %08x\n",$pc,$lr,$r0,$r1,$r3,$r4 printf "r10=%08x r11=%08x r12=%08x r13=%08x r14=%08x r15=%08x\n",$r10,$r11,$r12,$r13,$r14,$r15 diff -r b884271bcab2 -r 5f180dc8d84e Makefile --- a/Makefile Mon Mar 24 01:28:02 2003 +0900 +++ b/Makefile Mon Mar 24 03:05:54 2003 +0900 @@ -49,10 +49,10 @@ check: $(MC) -gcc $(TARGET).c -o b.out - -b.out > $(TARGET).gcc.out - -$(MC) -s $(TARGET).c + -./b.out > $(TARGET).gcc.out + -./$(MC) -s $(TARGET).c -gcc $(TARGET).s - -a.out > $(TARGET).$(MC).out + -./a.out > $(TARGET).$(MC).out -diff $(TARGET).gcc.out $(TARGET).$(MC).out tar : diff -r b884271bcab2 -r 5f180dc8d84e mc-code-ia32.c --- a/mc-code-ia32.c Mon Mar 24 01:28:02 2003 +0900 +++ b/mc-code-ia32.c Mon Mar 24 03:05:54 2003 +0900 @@ -1264,7 +1264,7 @@ int code_csvalue() { - return creg; /* for switch value */ + return rname[creg]; /* for switch value */ } void @@ -1272,7 +1272,7 @@ { /* used in dosiwtch() */ if(chk) return; - use_register(creg,rname[csreg],0); + use_register(creg,csreg,0); printf("\tcmpl $%d,%s\n",e,register_name(creg,0)); } diff -r b884271bcab2 -r 5f180dc8d84e mc-code-powerpc.c --- a/mc-code-powerpc.c Mon Mar 24 01:28:02 2003 +0900 +++ b/mc-code-powerpc.c Mon Mar 24 03:05:54 2003 +0900 @@ -469,6 +469,7 @@ free_all_register(); max_reg_var=-1; max_freg_var=-1; reg_sp = 0; + freg_sp = 0; text_mode(); } diff -r b884271bcab2 -r 5f180dc8d84e mc-parse.c --- a/mc-parse.c Mon Mar 24 01:28:02 2003 +0900 +++ b/mc-parse.c Mon Mar 24 03:05:54 2003 +0900 @@ -861,7 +861,8 @@ } args += size_of_int; } else { - if (n->dsp==0) + /* if (n->dsp==0) (argument list in ADECL is useless, type + list can be found in type ) */ n->dsp = args; args += sz; }