diff mc-code-arm.c @ 638:35014112c01d

multi dimentional array in functional arugments. (not yet fixed)
author kono
date Tue, 31 Oct 2006 22:40:19 +0900
parents 140b65f8ff03
children cddab906095e
line wrap: on
line diff
--- a/mc-code-arm.c	Tue Oct 31 20:42:42 2006 +0900
+++ b/mc-code-arm.c	Tue Oct 31 22:40:19 2006 +0900
@@ -2440,7 +2440,7 @@
     } else if (t==FLOAT) {
 	reg_arg ++ ; freg_arg++;
 	nargs += size(t)/SIZE_OF_INT;
-    } else if (t>=0&&(car(t)==STRUCT||car(t)==UNION||car(t)==ARRAY)) {
+    } else if (t>=0&&(car(t)==STRUCT||car(t)==UNION)) {
 	nargs += round4(size(t))/SIZE_OF_INT;
     } else {
 	error(TYERR);
@@ -2485,7 +2485,7 @@
 	    return list3(LVAR,caller_arg_offset_v(nargs),0);
 	} else
 	    return get_input_dregister_var(reg_arg,0,0,1);
-    } else if (t>=0&&(car(t)==STRUCT||car(t)==UNION||car(t)==ARRAY)) {
+    } else if (t>=0&&(car(t)==STRUCT||car(t)==UNION)) {
 	if (mode==AS_SAVE) {
 	    return get_register_var(0);
 	} else
@@ -2565,12 +2565,12 @@
 	    pnargs=nargs;preg_arg=reg_arg;pfreg_arg=freg_arg;
 	    complex_ = e3;
 	}
-	if (t>=0&&(car(t)==STRUCT||car(t)==UNION||car(t)==ARRAY)) {
+	if (t>=0&&(car(t)==STRUCT||car(t)==UNION)) {
 	    // The struct should be pushed after complex arguments.
 	    if (e5) { // compute address only, complex_ is me now. Clear it.
 		complex_ = 0;
 		e4 = car(e3);
-		if (car(e4)!=RSTRUCT && car(e4)!=ARRAY) error(-1);
+		if (car(e4)!=RSTRUCT) error(-1);
 		if (!simple_arg(cadr(e4))) {
 		    // Calculate complex struct address here.
 		    // If simple, leave it.
@@ -3481,8 +3481,7 @@
 #endif
 	} else if (cadr(fnptr->ty)>0&&(
 	    car(cadr(fnptr->ty))==STRUCT ||
-	    car(cadr(fnptr->ty))==UNION ||
-	    car(cadr(fnptr->ty))==ARRAY)) {
+	    car(cadr(fnptr->ty))==UNION)) {
 	    sz = size(cadr(fnptr->ty));
 	    inc_inst(3);
 	    code_const(sz,REGISTER_OPERAND);