Commit aadc1c43 by Michael Hudson-Doyle Committed by Yvan Roux

re PR target/59799 (aarch64_pass_by_reference never passes arrays by value,…

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
parent d7cb47b4
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
......
......@@ -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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment