Commit 920ea3b8 by Jakub Jelinek Committed by Jakub Jelinek

function.c (assign_parm_find_data_types): Use RECORD_OR_UNION_TYPE_P before…

function.c (assign_parm_find_data_types): Use RECORD_OR_UNION_TYPE_P before testing TYPE_TRANSPARENT_AGGR.

	* function.c (assign_parm_find_data_types): Use RECORD_OR_UNION_TYPE_P
	before testing TYPE_TRANSPARENT_AGGR.
	* calls.c (initialize_argument_information, load_register_parameters):
	Likewise.

From-SVN: r275472
parent 28d67c17
2019-09-06 Jakub Jelinek <jakub@redhat.com>
* function.c (assign_parm_find_data_types): Use RECORD_OR_UNION_TYPE_P
before testing TYPE_TRANSPARENT_AGGR.
* calls.c (initialize_argument_information, load_register_parameters):
Likewise.
2019-09-06 Richard Earnshaw <rearnsha@arm.com> 2019-09-06 Richard Earnshaw <rearnsha@arm.com>
* config/arm/arm.md (cmp_and): Add short-it variant for thumb2 with * config/arm/arm.md (cmp_and): Add short-it variant for thumb2 with
......
...@@ -1991,8 +1991,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, ...@@ -1991,8 +1991,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
/* If TYPE is a transparent union or record, pass things the way /* If TYPE is a transparent union or record, pass things the way
we would pass the first field of the union or record. We have we would pass the first field of the union or record. We have
already verified that the modes are the same. */ already verified that the modes are the same. */
if ((TREE_CODE (type) == UNION_TYPE || TREE_CODE (type) == RECORD_TYPE) if (RECORD_OR_UNION_TYPE_P (type) && TYPE_TRANSPARENT_AGGR (type))
&& TYPE_TRANSPARENT_AGGR (type))
type = TREE_TYPE (first_field (type)); type = TREE_TYPE (first_field (type));
/* Decide where to pass this arg. /* Decide where to pass this arg.
...@@ -2772,9 +2771,7 @@ load_register_parameters (struct arg_data *args, int num_actuals, ...@@ -2772,9 +2771,7 @@ load_register_parameters (struct arg_data *args, int num_actuals,
HOST_WIDE_INT const_size = 0; HOST_WIDE_INT const_size = 0;
rtx_insn *before_arg = get_last_insn (); rtx_insn *before_arg = get_last_insn ();
tree type = TREE_TYPE (args[i].tree_value); tree type = TREE_TYPE (args[i].tree_value);
if ((TREE_CODE (type) == UNION_TYPE if (RECORD_OR_UNION_TYPE_P (type) && TYPE_TRANSPARENT_AGGR (type))
|| TREE_CODE (type) == RECORD_TYPE)
&& TYPE_TRANSPARENT_AGGR (type))
type = TREE_TYPE (first_field (type)); type = TREE_TYPE (first_field (type));
/* Set non-negative if we must move a word at a time, even if /* Set non-negative if we must move a word at a time, even if
just one word (e.g, partial == 4 && mode == DFmode). Set just one word (e.g, partial == 4 && mode == DFmode). Set
......
...@@ -2443,8 +2443,7 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm, ...@@ -2443,8 +2443,7 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm,
/* If the parm is to be passed as a transparent union or record, use the /* If the parm is to be passed as a transparent union or record, use the
type of the first field for the tests below. We have already verified type of the first field for the tests below. We have already verified
that the modes are the same. */ that the modes are the same. */
if ((TREE_CODE (data->arg.type) == UNION_TYPE if (RECORD_OR_UNION_TYPE_P (data->arg.type)
|| TREE_CODE (data->arg.type) == RECORD_TYPE)
&& TYPE_TRANSPARENT_AGGR (data->arg.type)) && TYPE_TRANSPARENT_AGGR (data->arg.type))
data->arg.type = TREE_TYPE (first_field (data->arg.type)); data->arg.type = TREE_TYPE (first_field (data->arg.type));
......
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