Mercurial > hg > CbC > old > device
diff mc-code-ia32.c @ 78:8418d4b7caa7
*** empty log message ***
author | kono |
---|---|
date | Sun, 02 Mar 2003 23:46:10 +0900 |
parents | 2b8ba655e572 |
children | f94ca1168520 |
line wrap: on
line diff
--- a/mc-code-ia32.c Fri Feb 28 20:29:21 2003 +0900 +++ b/mc-code-ia32.c Sun Mar 02 23:46:10 2003 +0900 @@ -110,6 +110,7 @@ void code_closing(); void code_leave(char *name); int lvar(int l); +void global_table(void); void code_init(void) @@ -731,15 +732,17 @@ } if (car(e2) == FNAME) { n=(NMTBL *)cadr(e2); + regv[creg]=0; + use_register(creg,REG_EAX,0); /* will be destroyed */ } else { - use_register(creg,REG_EAX,0); g_expr(e2); + regv[creg]=1; + use_register(creg,REG_EAX,1); /* will be destroyed */ } /* we don't have to save creg nor dreg */ regs[creg]=0; regs[dreg]=0; - regv[creg]= regv[dreg]= regv[save]= 0; - use_register(creg,REG_EAX,0); + regv[dreg]= regv[save]= 0; use_register(dreg,REG_EDX,0); /* will be destroyed */ use_register(save,REG_ECX,0); /* will be destroyed */ regs[creg]=1; regs[dreg]=1; @@ -1005,6 +1008,7 @@ void code_closing() { + global_table(); printf("\t.ident \"Micro-C compiled\"\n"); }