[commited] hppa: Cleanup ASM_DECLARE_FUNCTION_NAME define in som.h

Message ID 5A5EAB0C.8050609@bell.net
State New
Headers show
Series
  • [commited] hppa: Cleanup ASM_DECLARE_FUNCTION_NAME define in som.h
Related show

Commit Message

John David Anglin Jan. 17, 2018, 1:46 a.m.
This shortens and simplifies a number of lines in ASM_DECLARE_FUNCTION_NAME.

Committed to trunk.

Dave

-- 
John David Anglin  dave.anglin@bell.net
2018-01-16  John David Anglin  <danglin@gcc.gnu.org>

	* config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
	variables.

Patch

Index: config/pa/som.h
===================================================================
--- config/pa/som.h	(revision 256744)
+++ config/pa/som.h	(working copy)
@@ -119,11 +119,11 @@ 
 	     for (parm = DECL_ARGUMENTS (DECL), i = 0; parm && i < 4;	\
 		  parm = DECL_CHAIN (parm))				\
 	       {							\
-		 if (TYPE_MODE (DECL_ARG_TYPE (parm)) == SFmode		\
-		     && ! TARGET_SOFT_FLOAT)				\
+		 tree type = DECL_ARG_TYPE (parm);			\
+		 machine_mode mode = TYPE_MODE (type);			\
+		 if (mode == SFmode && ! TARGET_SOFT_FLOAT)		\
 		   fprintf (FILE, ",ARGW%d=FR", i++);			\
-		 else if (TYPE_MODE (DECL_ARG_TYPE (parm)) == DFmode	\
-			  && ! TARGET_SOFT_FLOAT)			\
+		 else if (mode == DFmode && ! TARGET_SOFT_FLOAT)	\
 		   {							\
 		     if (i <= 2)					\
 		       {						\
@@ -135,13 +135,10 @@ 
 		   }							\
 		 else							\
 		   {							\
-		     int arg_size =					\
-		       pa_function_arg_size (TYPE_MODE (DECL_ARG_TYPE (parm)),\
-					     DECL_ARG_TYPE (parm));	\
+		     int arg_size = pa_function_arg_size (mode, type);	\
 		     /* Passing structs by invisible reference uses	\
 			one general register.  */			\
-		     if (arg_size > 2					\
-			 || TREE_ADDRESSABLE (DECL_ARG_TYPE (parm)))	\
+		     if (arg_size > 2 || TREE_ADDRESSABLE (type))	\
 		       arg_size = 1;					\
 		     if (arg_size == 2 && i <= 2)			\
 		       {						\