diff mc-codegen.c @ 305:117baacd1ed0

stdarg powerpc passed except long long (macro problem)
author kono
date Wed, 09 Jun 2004 15:18:32 +0900
parents 0f79c95df73a
children f73b93de216a
line wrap: on
line diff
--- a/mc-codegen.c	Tue Jun 08 16:40:32 2004 +0900
+++ b/mc-codegen.c	Wed Jun 09 15:18:32 2004 +0900
@@ -650,6 +650,25 @@
     return type==FUNCTION || (type>0 && car(type)==FUNCTION);
 }
 
+int 
+function_type(int e1,int *dots)
+{
+    int ret_type,t;
+    ret_type = cadr(e1);
+    if (ret_type==CHAR) ret_type=INT;
+
+    /* check argments type is DOTS? */
+    t = caddr(e1);
+    if (t==0 || t==DOTS) *dots = 1;
+    else {
+        *dots = 0;
+        for(;t;t = cadr(t)) {
+            if (car(t)==DOTS) *dots = 1;
+        }
+    }
+
+    return ret_type;
+}
 
 static int
 register_to_lvar(int e)