changeset 234:eccea7c904ee

float powerpc drexp done (?)
author kono
date Thu, 29 Apr 2004 19:40:43 +0900
parents 2208a18f3799
children c575422d8b6e
files Changes mc-code-powerpc.c
diffstat 2 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Changes	Thu Apr 29 13:30:04 2004 +0900
+++ b/Changes	Thu Apr 29 19:40:43 2004 +0900
@@ -4091,3 +4091,7 @@
 なんか、まるででたらめに動いているみたい....
 
 function() の中で、lreg がinput registerと重なってしまう。
+
+Thu Apr 29 19:40:08 JST 2004
+
+良くわかんないけど通った。
--- a/mc-code-powerpc.c	Thu Apr 29 13:30:04 2004 +0900
+++ b/mc-code-powerpc.c	Thu Apr 29 19:40:43 2004 +0900
@@ -3129,7 +3129,7 @@
     case DMUL: opn="fmul"; break;
     case FCMP:
     case DCMP: 
-	printf("\tfcmpu cr0,%s,%s\n",frn,grn);
+	printf("\tfcmpu cr7,%s,%s\n",frn,grn);
 	free_register(e1);
 	return;
     case FCMPGE: 
@@ -3266,26 +3266,26 @@
 		op=DOP+EQ; break;
 	}
     }
-    g_expr(list3(
-	((op==DOP+GE||op==FOP+GE)?DCMPGE:DCMP),
-	e2,e1));
+    // g_expr(list3( ((op==DOP+GE||op==FOP+GE)?DCMPGE:DCMP), e2,e1));
+    g_expr(list3(DCMP, e1,e2));
     switch(op) {
 	case DOP+GT:
 	case FOP+GT:
-	    printf("\tble\tcr0,L_%d\n",l1);
+	    printf("\tbgt\tcr7,L_%d\n",l1);
 	    break;
 	case DOP+GE:
 	case FOP+GE:
-	    printf("\tcrnor 30,29,30\n");
-	    printf("\tbeq\tcr7,L_%d\n",l1);
+	    // printf("\tcrnor 30,29,30\n");
+	    // printf("\tbeq\tcr7,L_%d\n",l1);
+	    printf("\tbge\tcr7,L_%d\n",l1);
 	    break;
 	case DOP+EQ:
 	case FOP+EQ:
-	    printf("\tbeq\tcr0,L_%d\n",l1);
+	    printf("\tbeq\tcr7,L_%d\n",l1);
 	    break;
 	case DOP+NEQ:
 	case FOP+NEQ:
-	    printf("\tbne\tcr0,L_%d\n",l1);
+	    printf("\tbne\tcr7,L_%d\n",l1);
 	    break;
     }
 }