diff mc-code-powerpc.c @ 450:eaf9e2746c83 simple-exp-in-parallel-assign

parallel assign for simple expr. (too complex solution) statement expression (GNU extension fix) non_lazy function reference in PowerPC
author kono
date Sun, 28 Nov 2004 03:28:38 +0900
parents c55363eff5e5
children 1e5ca85d3f97
line wrap: on
line diff
--- a/mc-code-powerpc.c	Thu Nov 25 16:56:26 2004 +0900
+++ b/mc-code-powerpc.c	Sun Nov 28 03:28:38 2004 +0900
@@ -245,7 +245,6 @@
 static int code_l2(long long ll);
 #endif
 
-static void code_save_stacks();
 static void code_save_input_registers(int dots);
 static void    set_ireg(int,int);
 static void    set_freg(int,int);
@@ -1777,9 +1776,13 @@
 int
 not_simple_p(int e3)
 {
-    return e3==FUNCTION||e3==CONV/*||e3==RSTRUCT*/||e3==STASS|| 
-	e3==LLSHIFT||e3==LULSHIFT||e3==LRSHIFT||e3==LURSHIFT||
-	e3==LDIV||e3==LUDIV||e3==LMOD||e3==LUMOD||e3==LASSOP||e3==ALLOCA;
+    switch (e3) {
+    case FUNCTION: case CONV: case LCALL: case STASS:  
+	case LLSHIFT: case LULSHIFT: case LRSHIFT: case LURSHIFT: 
+	case LDIV: case LUDIV: case LMOD: case LUMOD: case LASSOP: case ALLOCA:
+    return 1;
+    }
+    return 0;
 }
 
 static int
@@ -2818,6 +2821,18 @@
 }
 
 void
+code_label_call(int l)
+{
+	printf("\tbl\tL_%d\n",l);
+}
+
+void
+code_ret()
+{
+	printf("\tblr\n");
+}
+
+void
 leave(int control, char *name)
 {
     int retcont1=0,sz;
@@ -2868,7 +2883,7 @@
 	printf("\tmtlr r0\n");
 	printf("\tlmw r%d,%d(r1)\n",
 		    REG_VAR_BASE-max_reg_var,reg_save);
-	printf("\tblr\n");
+	code_ret();
     }
 
     disp &= -SIZE_OF_INT;
@@ -3150,7 +3165,7 @@
     }
     init = 0;
     for(n = global_list;n!=&null_nptr;n = n->next) {
-	if (is_code(n)||is_function(n)) continue;
+//	if (is_code(n)||is_function(n)) continue;
 	if (n->sc==EXTRN1) {
 	    if(init==0) {
 		printf(".data\n");