Commit fa5b0972 by Alan Modra Committed by Alan Modra

re PR target/25406 (gcc.dg/20030625-1.c, gcc.dg/20050620-1.c, gcc.dg/940510-1.c,…

re PR target/25406 (gcc.dg/20030625-1.c, gcc.dg/20050620-1.c, gcc.dg/940510-1.c, gcc.dg/c99-flex-array-1.c, gcc.dg/pr14475.c, and gcc.dg/noncompile/incomplete-1.c fail on powerpc-darwin)

	PR target/25406
	* config/rs6000/rs6000.c (rs6000_special_round_type_align): Handle
	error_mark_node.  Make alignment params unsigned.
	* config/rs6000/rs6000-protos.h
	(rs6000_special_round_type_align): Update prototype.
	(rs6000_machopic_legitimize_pic_address): Remove arg names.

From-SVN: r108562
parent 018c145d
2005-12-15 Alan Modra <amodra@bigpond.net.au>
PR target/25406
* config/rs6000/rs6000.c (rs6000_special_round_type_align): Handle
error_mark_node. Make alignment params unsigned.
* config/rs6000/rs6000-protos.h
(rs6000_special_round_type_align): Update prototype.
(rs6000_machopic_legitimize_pic_address): Remove arg names.
2005-12-14 Ulrich Weigand <uweigand@de.ibm.com> 2005-12-14 Ulrich Weigand <uweigand@de.ibm.com>
PR rtl-optimization/25310 PR rtl-optimization/25310
......
...@@ -105,14 +105,13 @@ extern rtx rs6000_return_addr (int, rtx); ...@@ -105,14 +105,13 @@ extern rtx rs6000_return_addr (int, rtx);
extern void rs6000_output_symbol_ref (FILE*, rtx); extern void rs6000_output_symbol_ref (FILE*, rtx);
extern HOST_WIDE_INT rs6000_initial_elimination_offset (int, int); extern HOST_WIDE_INT rs6000_initial_elimination_offset (int, int);
extern rtx rs6000_machopic_legitimize_pic_address (rtx orig, extern rtx rs6000_machopic_legitimize_pic_address (rtx, enum machine_mode,
enum machine_mode mode, rtx);
rtx reg);
#endif /* RTX_CODE */ #endif /* RTX_CODE */
#ifdef TREE_CODE #ifdef TREE_CODE
extern unsigned int rs6000_special_round_type_align (tree, int, int); extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
unsigned int);
extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
tree, int, int); tree, int, int);
extern int function_arg_boundary (enum machine_mode, tree); extern int function_arg_boundary (enum machine_mode, tree);
......
...@@ -2505,21 +2505,27 @@ invalid_e500_subreg (rtx op, enum machine_mode mode) ...@@ -2505,21 +2505,27 @@ invalid_e500_subreg (rtx op, enum machine_mode mode)
field is an FP double while the FP fields remain word aligned. */ field is an FP double while the FP fields remain word aligned. */
unsigned int unsigned int
rs6000_special_round_type_align (tree type, int computed, int specified) rs6000_special_round_type_align (tree type, unsigned int computed,
unsigned int specified)
{ {
unsigned int align = MAX (computed, specified);
tree field = TYPE_FIELDS (type); tree field = TYPE_FIELDS (type);
/* Skip all non field decls */ /* Skip all non field decls */
while (field != NULL && TREE_CODE (field) != FIELD_DECL) while (field != NULL && TREE_CODE (field) != FIELD_DECL)
field = TREE_CHAIN (field); field = TREE_CHAIN (field);
if (field == NULL || field == type if (field != NULL && field != type)
|| TYPE_MODE (TREE_CODE (TREE_TYPE (field)) == ARRAY_TYPE {
? get_inner_array_type (field) type = TREE_TYPE (field);
: TREE_TYPE (field)) != DFmode) while (TREE_CODE (type) == ARRAY_TYPE)
return MAX (computed, specified); type = TREE_TYPE (type);
if (type != error_mark_node && TYPE_MODE (type) == DFmode)
align = MAX (align, 64);
}
return MAX (MAX (computed, specified), 64); return align;
} }
/* Return 1 for an operand in small memory on V.4/eabi. */ /* Return 1 for an operand in small memory on V.4/eabi. */
......
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