changeset 139:742224f4da02

*** empty log message ***
author kono
date Tue, 06 May 2003 02:36:55 +0900
parents e6e77af048a1
children aac62d1e30a6
files mc-code-ia32.c mc-code-mips.c mc-code-powerpc.c mc-code.h mc-codegen.c
diffstat 5 files changed, 44 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/mc-code-ia32.c	Tue May 06 02:31:46 2003 +0900
+++ b/mc-code-ia32.c	Tue May 06 02:36:55 2003 +0900
@@ -248,7 +248,7 @@
 }
 
 void 
-free_dregister(int i,int d) {
+free_dregister(int i) {
     error(-1);
 }
 
--- a/mc-code-mips.c	Tue May 06 02:31:46 2003 +0900
+++ b/mc-code-mips.c	Tue May 06 02:36:55 2003 +0900
@@ -390,7 +390,7 @@
 }
 
 void 
-free_dregister(int i,int d) {    /* いらなくなったレジスタを開放 */
+free_dregister(int i) {    /* いらなくなったレジスタを開放 */
     if (i<0||MAX_FREGISTER<i) error(-1);
     fregv[i]=fregs[i]=0;
 }
@@ -492,8 +492,8 @@
 	free_register(reg_stack[--reg_sp]);
     }
     if (cond_freg!=-1) { 
-	if(car(cond_freg)==DREGISTER) free_dregister(cadr(cond_freg),1); 
-	else if(car(cond_freg)==FREGISTER) free_dregister(cadr(cond_freg),0); 
+	if(car(cond_freg)==DREGISTER) free_dregister(cadr(cond_freg)); 
+	else if(car(cond_freg)==FREGISTER) free_dregister(cadr(cond_freg)); 
 	cond_freg=-1; 
     }
     if (cond_reg!=-1)  { 
@@ -1112,7 +1112,7 @@
     if (reg!=freg) {
 	if (mode) 
 	    printf("\tfmove %s,%s\n",fregister_name(reg),fregister_name(freg));
-	free_dregister(freg,1);
+	free_dregister(freg);
 	freg = reg;
 	fregs[freg]=1;
     }
@@ -1168,9 +1168,9 @@
 	if (tag==REGISTER) {
 	    free_register(reg);
 	} else if (tag==DREGISTER) {
-	    free_dregister(reg,1);
+	    free_dregister(reg);
 	} else if (tag==FREGISTER) {
-	    free_dregister(reg,0);
+	    free_dregister(reg);
 	}
     }
     my_func_args = offset;
@@ -1318,8 +1318,8 @@
     }
     for(;reg_arg_list;reg_arg_list=cadr(reg_arg_list)) {
 	arg = car(reg_arg_list);
-	if (car(arg)==DREGISTER) free_dregister(cadr(arg),1);
-	else if (car(arg)==FREGISTER) free_dregister(cadr(arg),0);
+	if (car(arg)==DREGISTER) free_dregister(cadr(arg));
+	else if (car(arg)==FREGISTER) free_dregister(cadr(arg));
 	else if (car(arg)==REGISTER) free_register(cadr(arg));
 	else if (car(arg)==LVAR&&cadr(arg)<0) free_lvar(cadr(arg));
     }
@@ -2034,7 +2034,7 @@
     frn = register_name(e2);
     printf("\tli.s %s,%g\n",grn,0.0);
     printf("\tc.eq.s %s,%s\n",grn,frn);
-    free_dregister(greg,d);
+    free_dregister(greg);
     return;
 }
 
@@ -2192,7 +2192,7 @@
     char *nm = ((NMTBL*)cadr(e2))->nm;
     printf("\t%s %s,%s\n",fload(1),grn,nm);
     printf("\tfcmpu cr0,%s,%s\n",frn,grn);
-    free_dregister(g,d);
+    free_dregister(g);
     fregv[freg]=0;
 }
 
@@ -2204,7 +2204,7 @@
 
     printf("\t%s %s,",fload(1),grn); lvar(e2);
     printf("\tfcmpu cr0,%s,%s\n",frn,grn);
-    free_dregister(g,d);
+    free_dregister(g);
     fregv[freg]=0;
 }
 
@@ -2225,25 +2225,25 @@
     case DMUL: opn="fmul"; break;
     case FCMP:
 	printf("\tfcmpu cr0,%s,%s\n",frn,grn);
-	free_dregister(e1,0);
+	free_dregister(e1);
 	return;
     case DCMP: 
 	printf("\tfcmpu cr0,%s,%s\n",frn,grn);
-	free_dregister(e1,1);
+	free_dregister(e1);
 	return;
     case FCMPGE: 
 	printf("\tfcmpu cr7,%s,%s\n",frn,grn);
-	free_dregister(e1,0);
+	free_dregister(e1);
 	return;
     case DCMPGE: 
 	printf("\tfcmpu cr7,%s,%s\n",frn,grn);
-	free_dregister(e1,1);
+	free_dregister(e1);
 	return;
     default:
 	error(-1); return;
     }
     printf("\t%s %s,%s,%s\n",opn,frn,frn,grn);
-    free_dregister(e1,1);
+    free_dregister(e1);
 }
 
 void
@@ -2283,7 +2283,7 @@
     else
 	printf("\tfsub %s,%s,%s\n",frn,frn,grn);
     printf("\t%s %s,0(%s)\n",fstore(d),frn,crn);
-    free_dregister(g,d);
+    free_dregister(g);
     fregv[freg]=1;
 }
 
@@ -2307,7 +2307,7 @@
     else
 	printf("\tfsub %s,%s,%s\n",grn,frn,grn);
     printf("\t%s %s,0(%s)\n",fstore(d),grn,crn);
-    free_dregister(g,d);
+    free_dregister(g);
     fregv[freg]=1;
 }
 
@@ -2351,7 +2351,7 @@
 
 void emit_dpop_free(int e1,int d)
 { 
-    free_dregister(e1,d);
+    free_dregister(e1);
 }
 
 void emit_dpush(int d)
--- a/mc-code-powerpc.c	Tue May 06 02:31:46 2003 +0900
+++ b/mc-code-powerpc.c	Tue May 06 02:36:55 2003 +0900
@@ -433,7 +433,7 @@
 }
 
 void 
-free_dregister(int i,int d) {    /* いらなくなったレジスタを開放 */
+free_dregister(int i) {    /* いらなくなったレジスタを開放 */
     if (i<0||MAX_FREGISTER<i) error(-1);
     fregv[i]=fregs[i]=0;
 }
@@ -549,8 +549,8 @@
 	free_register(reg_stack[--reg_sp]);
     }
     if (cond_freg!=-1) { 
-	if(car(cond_freg)==DREGISTER) free_dregister(cadr(cond_freg),1); 
-	else if(car(cond_freg)==FREGISTER) free_dregister(cadr(cond_freg),0); 
+	if(car(cond_freg)==DREGISTER) free_dregister(cadr(cond_freg)); 
+	else if(car(cond_freg)==FREGISTER) free_dregister(cadr(cond_freg)); 
 	cond_freg=-1; 
     }
     if (cond_reg!=-1)  { 
@@ -1283,7 +1283,7 @@
     if (reg!=freg) {
 	if (mode) 
 	    printf("\tfmr %s,%s\n",fregister_name(reg),fregister_name(freg));
-	free_dregister(freg,1);
+	free_dregister(freg);
 	freg = reg;
 	fregs[freg]=1;
     }
@@ -1339,9 +1339,9 @@
 	if (tag==REGISTER) {
 	    free_register(reg);
 	} else if (tag==DREGISTER) {
-	    free_dregister(reg,1);
+	    free_dregister(reg);
 	} else if (tag==FREGISTER) {
-	    free_dregister(reg,0);
+	    free_dregister(reg);
 	}
     }
     my_func_args = offset;
@@ -1511,8 +1511,8 @@
     }
     for(;reg_arg_list;reg_arg_list=cadr(reg_arg_list)) {
 	arg = car(reg_arg_list);
-	if (car(arg)==DREGISTER) free_dregister(cadr(arg),1);
-	else if (car(arg)==FREGISTER) free_dregister(cadr(arg),0);
+	if (car(arg)==DREGISTER) free_dregister(cadr(arg));
+	else if (car(arg)==FREGISTER) free_dregister(cadr(arg));
 	else if (car(arg)==REGISTER) free_register(cadr(arg));
 	else if (car(arg)==LVAR&&cadr(arg)<0) free_lvar(cadr(arg));
     }
@@ -2285,7 +2285,7 @@
     rrn = register_name(r);
     printf("\tlfs %s,0(%s)\n",grn,rrn);
     printf("\tfcmpu cr0,%s,%s\n",grn,frn);
-    free_dregister(greg,d);
+    free_dregister(greg);
     return;
 }
 
@@ -2582,7 +2582,7 @@
     r = get_ptr_cache((NMTBL*)cadr(e2));
     printf("\t%s %s,0(%s)\n",fload(1),grn,register_name(r));
     printf("\tfcmpu cr0,%s,%s\n",frn,grn);
-    free_dregister(g,d);
+    free_dregister(g);
     fregv[freg]=0;
 }
 
@@ -2595,7 +2595,7 @@
     lvar_intro(e2);
     printf("\t%s %s,",fload(1),grn); lvar(e2);
     printf("\tfcmpu cr0,%s,%s\n",frn,grn);
-    free_dregister(g,d);
+    free_dregister(g);
     fregv[freg]=0;
 }
 
@@ -2617,18 +2617,18 @@
     case FCMP:
     case DCMP: 
 	printf("\tfcmpu cr0,%s,%s\n",frn,grn);
-	free_dregister(e1,1);
+	free_dregister(e1);
 	return;
     case FCMPGE: 
     case DCMPGE: 
 	printf("\tfcmpu cr7,%s,%s\n",frn,grn);
-	free_dregister(e1,1);
+	free_dregister(e1);
 	return;
     default:
 	error(-1); return;
     }
     printf("\t%s %s,%s,%s\n",opn,frn,frn,grn);
-    free_dregister(e1,1);
+    free_dregister(e1);
 }
 
 void
@@ -2670,7 +2670,7 @@
     else
 	printf("\tfsub %s,%s,%s\n",frn,frn,grn);
     printf("\t%s %s,0(%s)\n",fstore(d),frn,crn);
-    free_dregister(g,d);
+    free_dregister(g);
     fregv[freg]=1;
 }
 
@@ -2698,7 +2698,7 @@
     else
 	printf("\tfsub %s,%s,%s\n",grn,frn,grn);
     printf("\t%s %s,0(%s)\n",fstore(d),grn,crn);
-    free_dregister(g,d);
+    free_dregister(g);
     fregv[freg]=1;
 }
 
@@ -2742,7 +2742,7 @@
 
 void emit_dpop_free(int e1,int d)
 { 
-    free_dregister(e1,1);
+    free_dregister(e1);
 }
 
 void emit_dpush(int d)
--- a/mc-code.h	Tue May 06 02:31:46 2003 +0900
+++ b/mc-code.h	Tue May 06 02:36:55 2003 +0900
@@ -130,7 +130,7 @@
 extern int get_register(void);
 extern int get_dregister(int);
 extern void free_register(int i) ;
-extern void free_dregister(int i,int d) ;
+extern void free_dregister(int i) ;
 extern int pop_register(void);
 extern void emit_pop_free(int xreg);
 
--- a/mc-codegen.c	Tue May 06 02:31:46 2003 +0900
+++ b/mc-codegen.c	Tue May 06 02:36:55 2003 +0900
@@ -540,9 +540,9 @@
     if (tag==REGISTER) {
 	free_register(reg);
     } else if (tag==DREGISTER) {
-	free_dregister(reg,1);
+	free_dregister(reg);
     } else if (tag==FREGISTER) {
-	free_dregister(reg,0);
+	free_dregister(reg);
     }
     return g_expr0(lvar);
 #endif
@@ -588,9 +588,9 @@
 	    if (car(caddr(use0))==REGISTER)
 		free_register(cadr(caddr(use0)));
 	    else if (car(caddr(use0))==FREGISTER)
-		free_dregister(cadr(caddr(use0)),0);
+		free_dregister(cadr(caddr(use0)));
 	    else if (car(caddr(use0))==DREGISTER)
-		free_dregister(cadr(caddr(use0)),1);
+		free_dregister(cadr(caddr(use0)));
 	    break;
 	}
 	use0 = cadr(use0);
@@ -849,9 +849,9 @@
 	if (car(caddr(use))==REGISTER)
 	    free_register(cadr(caddr(use)));
 	else if (car(caddr(use))==FREGISTER)
-	    free_dregister(cadr(caddr(use)),0);
+	    free_dregister(cadr(caddr(use)));
 	else if (car(caddr(use))==DREGISTER)
-	    free_dregister(cadr(caddr(use)),1);
+	    free_dregister(cadr(caddr(use)));
 	else if (car(caddr(use))==LVAR)
 	    free_lvar(cadr(caddr(use)));
 	use=cadr(use);