diff mc-code-ia32.c @ 144:56211702f298

creg/freg continue
author kono
date Wed, 21 May 2003 21:41:06 +0900
parents 742224f4da02
children cb7aa0089681
line wrap: on
line diff
--- a/mc-code-ia32.c	Tue May 20 11:19:01 2003 +0900
+++ b/mc-code-ia32.c	Wed May 21 21:41:06 2003 +0900
@@ -1132,9 +1132,9 @@
 code_assign(int e2,int byte,int creg) {
     if (byte) use_data_reg(creg,1);
     printf("\t%s %s,(%s)\n",move(byte),register_name(creg,byte),register_name(e2,0));
+    regv[creg]=1;
 }
 
-
 void
 code_register_assop(int e2,int op,int byte) {
     int reg;
@@ -1143,6 +1143,7 @@
     tosop(op,xreg);
     creg = xreg;
     printf("\tmovl %s,%s\n",register_name(reg,0),register_name(creg,0));
+    regv[creg]=1;
 }
 
 
@@ -1160,6 +1161,7 @@
     printf("\t%s %s,(%s)\n",byte ? "movb" : "movl",register_name(creg,byte),register_name(edx,0));
     edx_cleanup();
     emit_pop_free(xreg);
+    regv[creg]=1;
 }
 
 
@@ -1173,12 +1175,15 @@
     case LSHIFT:
     case ULSHIFT:
 	shift("sall",oreg);
+	regv[creg]=1;
 	return;
     case RSHIFT:
 	shift("sarl",oreg);
+	regv[creg]=1;
 	return;
     case URSHIFT:
 	shift("shrl",oreg);
+	regv[creg]=1;
 	return;
     }
     if(oreg==-1) {
@@ -1245,6 +1250,7 @@
     if (oreg!=dreg&&oreg>=0)
 	free_register(oreg);
     else if (oreg==dreg) regv[dreg]=0;
+    regv[creg]=1;
 }
 
 static int edx_stack=0;