diff mc-code-powerpc.c @ 569:1fcad06b264a

gcc4 (ia32)
author kono
date Thu, 12 Jan 2006 01:54:14 +0900
parents d6ff45d719a5
children 388baa7d4bee
line wrap: on
line diff
--- a/mc-code-powerpc.c	Wed Jan 11 18:30:24 2006 +0900
+++ b/mc-code-powerpc.c	Thu Jan 12 01:54:14 2006 +0900
@@ -1458,12 +1458,13 @@
 
 #define code_eq(cond) (cond?"eq":"ne")
 
-static int cmpflag = 0;
+static int cmpflag = 7;
 
 static void
 inc_cmpflag()
 {
-    cmpflag = (cmpflag+1)%8;
+    //  gcc use cmpflag 4 and 7, and gcc4 believes flag 4 is preserved.
+    // cmpflag = (cmpflag+1)%8;
 }
 
 void
@@ -2007,7 +2008,7 @@
     int jmp = 0;
     char *jrn;
     int complex_;
-    int pnargs,preg_arg,pfreg_arg;
+    int pnargs=0,preg_arg=0,pfreg_arg=0;
     int stargs;
 
     special_lvar = -1;
@@ -2712,7 +2713,7 @@
 int
 rexpr(int e1, int l1, int cond,int t)
 {       
-    char *s;
+    char *s=0;
     switch(car(e1)+BNOT*(!cond)) {
     case GT:  s=code_gt(1);  break;
     case UGT: s=code_ugt(1); break;
@@ -4655,7 +4656,7 @@
     char *crn_h;
     char *crn_l;
     char *grn;
-    int v;
+    int v=0;
     int greg;
 
     use_longlong(creg);
@@ -5358,8 +5359,8 @@
 set_bitsz(int type,int *pbitpos,int *pbitsize,
 	int *psign,int *pbitsz,int *palign,int *pl)
 { 
-    int sign=0,bitsz; 
-    int align,l=0;
+    int sign=0,bitsz=0; 
+    int align=4,l=0;
     *pbitpos = cadr(caddr(type));
     *pbitsize = caddr(caddr(type));
     switch(cadr(type)) {   /* value type */
@@ -5396,7 +5397,7 @@
     int l;
     set_bitsz(type,&bitpos0,&bitsize,&sign,&bitsz,&align,&l);
 
-    if (bitsize>bitsz) { error(BTERR); bitsize = i; }
+    if (bitsize>bitsz) { error(BTERR); bitsize = bitsz; }
 
     /* bfd means previous bit field bit offset */
     if (bitpos) {