diff options
author | Michael Hudson-Doyle <michael.hudson@linaro.org> | 2014-02-19 15:32:54 +0000 |
---|---|---|
committer | Yvan Roux <yroux@gcc.gnu.org> | 2014-02-19 15:32:54 +0000 |
commit | aadc1c43157fe7ae3f99b2ebc8aa1cf1850ded73 (patch) | |
tree | c9543ea77d86283640f055d449bad06ab2b60b43 /gcc | |
parent | d7cb47b448ef3d183f006a2f5dd6ac1f77ec20ad (diff) | |
download | gcc-aadc1c43157fe7ae3f99b2ebc8aa1cf1850ded73.zip gcc-aadc1c43157fe7ae3f99b2ebc8aa1cf1850ded73.tar.gz gcc-aadc1c43157fe7ae3f99b2ebc8aa1cf1850ded73.tar.bz2 |
re PR target/59799 (aarch64_pass_by_reference never passes arrays by value, contrary to ABI documentation)
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.
From-SVN: r207908
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 10 |
2 files changed, 10 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eca2f7a..5007b7a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index ea90311..901ad3d 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -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. */ |