changeset 589:f095b8507947

*** empty log message ***
author kono
date Wed, 18 Jan 2006 16:55:13 +0900
parents 82718dc9f758
children cc2a83f98188
files mc-code-ia32.c
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mc-code-ia32.c	Wed Jan 18 16:35:35 2006 +0900
+++ b/mc-code-ia32.c	Wed Jan 18 16:55:13 2006 +0900
@@ -175,8 +175,6 @@
 
 #define MAX_REGISTER 6            /* intel386のレジスタを6つまで使う*/
 #define REAL_MAX_REGISTER 8    /* intel386のレジスタが8つということ*/
-static int MAX_DATA_REG=4;    
-static int MAX_POINTER=3;    
 int MAX_REGISTER_VAR=2;    
 // static int MAX_FREGISTER=1;
 
@@ -453,8 +451,6 @@
 
     arg_offset = 8;
     // MAX_REGISTER=6;
-    MAX_DATA_REG=4;    
-    MAX_POINTER=3;    
     MAX_REGISTER_VAR=2;    
 
     reg_name[REG_EAX] = "%eax";
@@ -3759,7 +3755,7 @@
     a = ~mask|c;
     if (a!=-1) {
 	/* do conjunction  */
-	if (reg<MAX_DATA_REG && ((a& ~0xffff)==~0xffff)) {
+	if (is_data_reg(reg) && ((a& ~0xffff)==~0xffff)) {
 	    if ((a& ~0xff)==~0xff)
 		printf("\tandb $%d,%s\n",a&0xff,register_name(reg,1));
 	    else
@@ -3771,7 +3767,7 @@
     c = mask&c;
     if (c!=0) {
 	/* do disjunction  */
-	if (reg<MAX_DATA_REG && (!(c& ~0xffff))) {
+	if (is_data_reg(reg) && (!(c& ~0xffff))) {
 	    if (!(c& ~0xff))
 		printf("\torb $%d,%s\n",c&0xff,register_name(reg,1));
 	    else