diff mc-code-ia32.c @ 147:cb7aa0089681 creg-ireg-freg

creg/ireg done for powerpc.
author kono
date Wed, 11 Jun 2003 12:26:03 +0900
parents 56211702f298
children da529eab5618
line wrap: on
line diff
--- a/mc-code-ia32.c	Fri May 23 13:55:40 2003 +0900
+++ b/mc-code-ia32.c	Wed Jun 11 12:26:03 2003 +0900
@@ -192,6 +192,10 @@
     }
 }
 
+int use_int(int i) { return i;}
+int use_float(int i) { return i;}
+int use_double(int i) { return i;}
+
 void
 gexpr_code_init(void){
     use_register(creg,REG_EAX,0);
@@ -199,6 +203,10 @@
     regv[dreg]=0;
 }
 
+void
+code_gexpr(int e){
+}
+
 int
 register_var(int r) {
     return virtual(r+REG_ESI);
@@ -247,11 +255,6 @@
     return -1;
 }
 
-void 
-free_dregister(int i) {
-    error(-1);
-}
-
 int
 register_full(void)
 {
@@ -1739,7 +1742,7 @@
     printf("\tfchs\n");
 }
 
-void code_d2i(int freg,int creg)
+void code_d2i(int freg)
 { 
     printf("\tlea -%d(%%esp),%%esp\n",size_of_int*2);
     printf("\tfnstcw  (%%esp)\n");
@@ -1753,14 +1756,14 @@
     printf("\tpopl    %s\n",register_name(creg,0));
 }
 
-void code_i2d(int creg,int freg)
+void code_i2d(int creg)
 { 
     printf("\tpushl %s\n",register_name(creg,0));
     printf("\tfildl (%%esp)\n");
     printf("\tlea %d(%%esp),%%esp\n",size_of_int);
 }
 
-void code_d2u(int freg,int creg)
+void code_d2u(int freg)
 { 
     printf("\tlea -%d(%%esp),%%esp\n",size_of_int*3);
     printf("\tfnstcw  (%%esp)\n");
@@ -1774,7 +1777,7 @@
     printf("\tlea %d(%%esp),%%esp\n",size_of_int*3);
 }
 
-void code_u2d(int creg,int freg)
+void code_u2d(int creg)
 { 
     printf("\tpushl  %s\n",register_name(creg,0));
     printf("\tpushl  %s\n",register_name(creg,0));
@@ -1785,10 +1788,10 @@
 
 void code_d2f(int freg) { }
 void code_f2d(int freg) { }
-void code_f2i(int freg,int creg) { code_d2i(freg,creg); }
-void code_f2u(int freg,int creg) { code_d2u(freg,creg); }
-void code_i2f(int creg,int freg) { code_i2d(creg,freg); }
-void code_u2f(int creg,int freg) { code_u2d(creg,freg); }
+void code_f2i(int freg) { code_d2i(freg); }
+void code_f2u(int freg) { code_d2u(freg); }
+void code_i2f(int creg) { code_i2d(creg); }
+void code_u2f(int creg) { code_u2d(creg); }
 
 void code_drgvar(int e2,int d,int freg)
 {