changeset 612:26daeeef30a0

*** empty log message ***
author kono
date Sat, 15 Apr 2006 22:21:52 +0900
parents e761dfa47ed4
children 3b9e0e59ab97
files mc-code-powerpc.c mc-parse.c mc.h
diffstat 3 files changed, 79 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/mc-code-powerpc.c	Sun Apr 09 21:53:42 2006 +0900
+++ b/mc-code-powerpc.c	Sat Apr 15 22:21:52 2006 +0900
@@ -33,6 +33,8 @@
  "/usr/local/include",
  "/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include",
  "/usr/lib/gcc/i686-apple-darwin8/4.0.0/include/",
+ "/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include",
+ "/usr/lib/gcc/i686-apple-darwin8/4.0.1/include/",
  "/usr/include",
  "/System/Library/Frameworks",
  "/Library/Frameworks",
--- a/mc-parse.c	Sun Apr 09 21:53:42 2006 +0900
+++ b/mc-parse.c	Sat Apr 15 22:21:52 2006 +0900
@@ -685,6 +685,7 @@
     char *p=cheap->ptr;
     char *s,*t;
     struct cheap scheap,scheap1;
+
     save_cheap(&scheap,cheap);
     save_cheap(&scheap1,cheap); // make gcc happy
 
@@ -707,6 +708,9 @@
     for(s = ext; *s; s++) {
 	*cheap->ptr = *s; cheap = increment_cheap(cheap,&p);
     }
+	*cheap->ptr = 0; // by T.Matsu
+	*cheap->ptr = *s; cheap = increment_cheap(cheap,&p); // by T.Matsu
+
     cheap = reset_cheap(&scheap);
     return p;
 }
@@ -1074,18 +1078,20 @@
 	    getsym(0);
 	    t=LONGLONG;
 	    if (sym==INT) getsym(0);
-	    else if (sym==UNSIGNED) { 
-		if(getsym(0)==INT) getsym(0);
-		t=ULONGLONG; break; 
-	    }
+	    // else if (sym==UNSIGNED) { t=ULONGLONG; getsym(0); break; } -> 3 lines
+    else if (sym==UNSIGNED) { 
+	  if(getsym(0)==INT) getsym(0);
+	  t=ULONGLONG; break; 
+	} //
 	} else if(sym==DOUBLE) {
 	    getsym(0);
 	    t=DOUBLE;
 	} else if(sym==INT) { getsym(0);
+	  // }  else if(sym==UNSIGNED) { t=UNSIGNED; getsym(0); } -> 4 lines
 	} else if(sym==UNSIGNED) { 
-	    if(getsym(0)==INT) getsym(0);
-	    t=UNSIGNED; 
-	}
+	  if(getsym(0)==INT) getsym(0);
+	  t=UNSIGNED; 
+	} //
 	break;
     case TYPEOF:
 	getsym(0);
@@ -3746,16 +3752,16 @@
 	break;
     case C_FILE:
 	// return current file name
-	nptr=get_name(filep->name0,&e1,0);
-	type=list3(ARRAY,CHAR,e1);
-	e1=list3(STRING,(int)nptr,e1);
+	nptr=get_name(filep->name0,0,0);
+	type=list3(ARRAY,CHAR,nptr->dsp);
+	e1=list3(STRING,(int)nptr,nptr->dsp);
 	getsym(0);
 	break;
     case C_FUNCTION:
 	// return current function name
-	nptr=get_name(fnptr->nm,&e1,0);
-	type=list3(ARRAY,CHAR,e1);
-	e1=list3(STRING,(int)nptr,e1);
+	nptr=get_name(fnptr->nm,0,0);
+	type=list3(ARRAY,CHAR,nptr->dsp);
+	e1=list3(STRING,(int)nptr,nptr->dsp);
 	getsym(0);
 	break;
     case C_LINE:
--- a/mc.h	Sun Apr 09 21:53:42 2006 +0900
+++ b/mc.h	Sat Apr 15 22:21:52 2006 +0900
@@ -293,15 +293,16 @@
 #define CMPEQ  	78
 #define CMPNEQ 	79
 #define ASSOP  	80
-#define COMMA  	81
+#define UASSOP 	81
+#define COMMA  	82
 
-#define CASS   	82
-#define CASSOP 	83
-#define CUASSOP	84
+#define CASS   	(COP+ASS)
+#define CASSOP 	(COP+ASSOP)
+#define CUASSOP	(COP+UASSOP)
 
-#define SASS    (SOP+CASS)
-#define SASSOP (SOP+CASSOP)
-#define SUASSOP (SOP+CUASSOP)
+#define SASS    (SOP+ASS)
+#define SASSOP (SOP+ASSOP)
+#define SUASSOP (SOP+UASSOP)
 
 #define DASS    (DOP+ASS)
 #define DCMPGE  (DOP+CMPGE)
@@ -353,21 +354,21 @@
 #define LEOR    (LOP+EOR)
 #define LBOR    (LOP+BOR)
 
-#define BASS   	85
-#define BASSOP 	86
-#define BFD_REPL 	87
+#define BASS   	83
+#define BASSOP 	84
+#define BFD_REPL 	85
 
-#define JUMP 	88
+#define JUMP 	86
 
-#define STASS  	89
+#define STASS  	87
 
 
 #define BINARY_ARGS(i) ((MUL<=(i%SOP)&&(i%SOP)<=STASS))
 
 /* ternary  argments */
 
-#define COND   	90
-#define UCOND  	91
+#define COND   	88
+#define UCOND  	89
 #define SCOND   (SOP+COND)
 #define SUCOND   (SOP+UCOND)
 #define DCOND   (DOP+COND)
@@ -379,33 +380,33 @@
 
 /* not appeared as tags */
 
-#define LPAR   	92
-#define RPAR   	93
-#define LBRA   	94
-#define RBRA   	95
-#define LC     	96
-#define RC     	97
-#define COLON  	98
-#define SM     	99
-#define CNAME  	100
+#define LPAR   	90
+#define RPAR   	91
+#define LBRA   	92
+#define RBRA   	93
+#define LC     	94
+#define RC     	95
+#define COLON  	96
+#define SM     	97
+#define CNAME  	98
 
-#define I2C  	101
-#define I2S  	102
-#define I2I    	103
-#define I2U    	104
-#define I2D    	105
-#define I2F    	106
-#define I2LL   	107
-#define I2ULL  	108
+#define I2C  	99
+#define I2S  	100
+#define I2I    	101
+#define I2U    	102
+#define I2D    	103
+#define I2F    	104
+#define I2LL   	105
+#define I2ULL  	106
 
-#define U2UC  	109
-#define U2US  	110
-#define U2I    	111
-#define U2U    	112
-#define U2D    	113
-#define U2F    	114
-#define U2LL   	115
-#define U2ULL  	116
+#define U2UC  	107
+#define U2US  	108
+#define U2I    	109
+#define U2U    	110
+#define U2D    	111
+#define U2F    	112
+#define U2LL   	113
+#define U2ULL  	114
 
 
 #define D2I     (DOP+I2I)
@@ -440,27 +441,27 @@
 
 /* statement start */
 
-#define ST_DECL		117
-#define ST_IF		118
-#define ST_DO		119
-#define ST_WHILE	120
-#define ST_FOR		121
-#define ST_SWITCH	122
-#define ST_COMP		123
-#define ST_BREAK	124
-#define ST_CONTINUE	125
-#define ST_CASE		126
-#define ST_DEFAULT	127
-#define ST_RETURN	128
-#define ST_GOTO		129
-#define ST_ASM		130
-#define ST_LABEL	131
-#define ST_OP		132
-#define ST_COMMENT	133
+#define ST_DECL		115
+#define ST_IF		116
+#define ST_DO		117
+#define ST_WHILE	118
+#define ST_FOR		119
+#define ST_SWITCH	120
+#define ST_COMP		121
+#define ST_BREAK	122
+#define ST_CONTINUE	123
+#define ST_CASE		124
+#define ST_DEFAULT	125
+#define ST_RETURN	126
+#define ST_GOTO		127
+#define ST_ASM		128
+#define ST_LABEL	129
+#define ST_OP		130
+#define ST_COMMENT	131
 
 #define IS_STATEMENT(i) (i==INLINE||(ST_DECL<=i&&i<=ST_COMMENT))
 
-#define HAS_ADDRESS	134
+#define HAS_ADDRESS	132
 
 /* statement end */