From e28c262c90c0dbbc9c4532be0f1c09935e7f4bb5 Mon Sep 17 00:00:00 2001
From: "m.hayes" <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun, 2 Apr 2000 09:19:17 +0000
Subject: [PATCH] 	* config/c4x/c4x.c (c4x_function_arg): Check for
 void_type_node  	before checking MUST_PASS_IN_STACK.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32865 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog        | 5 +++++
 gcc/config/c4x/c4x.c | 8 +++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9f8c23501dee..83c2d2914ce0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-02  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
+
+	* config/c4x/c4x.c (c4x_function_arg): Check for void_type_node
+ 	before checking MUST_PASS_IN_STACK.
+
 2000-04-02  Neil Booth <NeilB@earthling.net>
 
 	* cppexp.c:  New FINISHED dummy token.  Combine operator initial
diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c
index 3ee934c08b5d..9972f472f68c 100644
--- a/gcc/config/c4x/c4x.c
+++ b/gcc/config/c4x/c4x.c
@@ -603,6 +603,11 @@ c4x_function_arg (cum, mode, type, named)
       cum->init = 1;
     }
 
+  /* This marks the last argument.  We don't need to pass this through
+     to the call insn.  */
+  if (type == void_type_node)
+    return 0;
+
   if (! TARGET_MEMPARM 
       && named 
       && type
@@ -742,7 +747,8 @@ c4x_assembler_function_p ()
   tree type;
 
   type = TREE_TYPE (current_function_decl);
-  return lookup_attribute ("assembler", TYPE_ATTRIBUTES (type)) != NULL;
+  return (lookup_attribute ("assembler", TYPE_ATTRIBUTES (type)) != NULL)
+    || (lookup_attribute ("naked", TYPE_ATTRIBUTES (type)) != NULL);
 }
 
 
-- 
GitLab