[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pcc-list
Subject:    mkext bug
From:       mickey <mickey () lucifier ! net>
Date:       2008-04-17 10:46:15
Message-ID: 20080417104615.GA4111 () lucifier ! net
[Download RAW message or body]

re
first chunk is just to improve the debugging.
the second however means as to why check register
requirements if there are no output registers?
this is the case for STARG nodes for example.
cu
-- 
    paranoic mickey       (my employers have changed but, the name has remained)

Index: mkext.c
===================================================================
RCS file: /cvs/src/usr.bin/pcc/mip/mkext.c,v
retrieving revision 1.8
diff -u -r1.8 mkext.c
--- mkext.c	11 Apr 2008 20:45:52 -0000	1.8
+++ mkext.c	17 Apr 2008 10:44:01 -0000
@@ -73,7 +73,20 @@
 	if (op < OPSIMP) {
 		s = opst[op];
 	} else
-		s = "Special op";
+		switch (op) {
+		default:	s = "Special op";	break;
+		case OPSIMP:	s = "OPLSIMP";	break;
+		case OPCOMM:	s = "OPCOMM";	break;
+		case OPMUL:	s = "OPMUL";	break;
+		case OPDIV:	s = "OPDIV";	break;
+		case OPUNARY:	s = "OPUNARY";	break;
+		case OPLEAF:	s = "OPLEAF";	break;
+		case OPANY:	s = "OPANY";	break;
+		case OPLOG:	s = "OPLOG";	break;
+		case OPFLOAT:	s = "OPFLOAT";	break;
+		case OPSHFT:	s = "OPSHFT";	break;
+		case OPLTYPE:	s = "OPLTYPE";	break;
+		}
 	printf("table entry %td, op %s: %s\n", q - table, s, str);
 }
 
@@ -173,8 +186,9 @@
 		/* check that reclaim is not the wrong class */
 		if ((q->rewrite & (RESC1|RESC2|RESC3)) && 
 		    !(q->needs & REWRITE)) {
-			if ((q->visit & getrcl(q)) == 0) {
-				compl(q, "rwong RESCx class");
+			if ((q->visit & INREGS) &&
+			    (q->visit & getrcl(q)) == 0) {
+				compl(q, "wrong RESCx class");
 				rval++;
 			}
 		}
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic