2014-02-19 Michael Hudson-Doyle <michael.hudson@linaro.org>
authoryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Feb 2014 15:32:54 +0000 (15:32 +0000)
committeryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Feb 2014 15:32:54 +0000 (15:32 +0000)
 PR target/59799
* config/aarch64/aarch64.c (aarch64_pass_by_reference): The rules for
passing arrays in registers are the same as for structs, so remove the
special case for them.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207908 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index eca2f7a..5007b7a 100644 (file)
@@ -1,3 +1,10 @@
+2014-02-19  Michael Hudson-Doyle  <michael.hudson@linaro.org>
+
+        PR target/59799
+       * config/aarch64/aarch64.c (aarch64_pass_by_reference): The rules for
+       passing arrays in registers are the same as for structs, so remove the
+       special case for them.
+
 2014-02-19  Eric Botcazou  <ebotcazou@adacore.com>
 
        * expr.c (expand_expr_real_1) <case VIEW_CONVERT_EXPR>: For a bit-field
index ea90311..901ad3d 100644 (file)
@@ -1197,14 +1197,10 @@ aarch64_pass_by_reference (cumulative_args_t pcum ATTRIBUTE_UNUSED,
   size = (mode == BLKmode && type)
     ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode);
 
-  if (type)
+  /* Aggregates are passed by reference based on their size.  */
+  if (type && AGGREGATE_TYPE_P (type))
     {
-      /* Arrays always passed by reference.  */
-      if (TREE_CODE (type) == ARRAY_TYPE)
-       return true;
-      /* Other aggregates based on their size.  */
-      if (AGGREGATE_TYPE_P (type))
-       size = int_size_in_bytes (type);
+      size = int_size_in_bytes (type);
     }
 
   /* Variable sized arguments are always returned by reference.  */