som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode variables.
authorJohn David Anglin <danglin@gcc.gnu.org>
Wed, 17 Jan 2018 00:09:44 +0000 (00:09 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Wed, 17 Jan 2018 00:09:44 +0000 (00:09 +0000)
* config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
variables.

From-SVN: r256769

gcc/ChangeLog
gcc/config/pa/som.h

index 80b04b94fb3c6625c493226f8c16ef15d0e3a9eb..e6d4baea3ce39d74b2a0dabaa9a4305d0d807c5e 100644 (file)
@@ -1,5 +1,8 @@
 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
 
+       * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
+       variables.
+
        * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
        return value.
 
index eea23cc2243d4fe7094e302c9d2231f987d4be3e..cc96c9187e5e71606ebc2970b423687cad34ce16 100644 (file)
@@ -119,11 +119,11 @@ do {                                                              \
             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 @@ do {                                                              \
                   }                                                    \
                 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)                       \
                       {                                                \