/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
#undef ADJUST_FIELD_ALIGN
#define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \
- (rs6000_special_adjust_field_align_p ((TYPE), (COMPUTED)) \
- ? 128 \
- : (TARGET_64BIT \
- && TARGET_ALIGN_NATURAL == 0 \
- && TYPE_MODE (strip_array_types (TYPE)) == DFmode) \
- ? MIN ((COMPUTED), 32) \
+ ((TARGET_64BIT \
+ && TARGET_ALIGN_NATURAL == 0 \
+ && TYPE_MODE (strip_array_types (TYPE)) == DFmode) \
+ ? MIN ((COMPUTED), 32) \
: (COMPUTED))
#undef TOC_SECTION_ASM_OP
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
#undef ADJUST_FIELD_ALIGN
#define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \
- (rs6000_special_adjust_field_align_p ((TYPE), (COMPUTED)) \
- ? 128 \
- : (TARGET_64BIT \
- && TARGET_ALIGN_NATURAL == 0 \
- && TYPE_MODE (strip_array_types (TYPE)) == DFmode) \
+ ((TARGET_64BIT \
+ && TARGET_ALIGN_NATURAL == 0 \
+ && TYPE_MODE (strip_array_types (TYPE)) == DFmode) \
? MIN ((COMPUTED), 32) \
: (COMPUTED))
/* "Aggregate" means any AGGREGATE_TYPE except for single-element
or homogeneous float/vector aggregates here. We already handled
vector aggregates above, but still need to check for float here. */
- bool aggregate_p = (AGGREGATE_TYPE_P (type)
- && !SCALAR_FLOAT_MODE_P (elt_mode));
-
- /* We used to check for BLKmode instead of the above aggregate type
- check. Warn when this results in any difference to the ABI. */
- if (aggregate_p != (mode == BLKmode))
- {
- static bool warned;
- if (!warned && warn_psabi)
- {
- warned = true;
- inform (input_location,
- "the ABI of passing aggregates with %d-byte alignment"
- " has changed in GCC 5",
- (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
- }
- }
-
- if (aggregate_p)
+ if (AGGREGATE_TYPE_P (type)
+ && !SCALAR_FLOAT_MODE_P (elt_mode))
return 128;
}
if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
&& cum->nargs_prototype > 0)
{
- static bool warned;
-
machine_mode rmode = TARGET_32BIT ? SImode : DImode;
int n_words = rs6000_arg_size (mode, type);
rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
}
while (++align_words < GP_ARG_NUM_REG && --n_words != 0);
-
- if (!warned && warn_psabi)
- {
- warned = true;
- inform (input_location,
- "the ABI of passing homogeneous %<float%> aggregates"
- " has changed in GCC 5");
- }
}
return rs6000_finish_function_arg (mode, rvec, k);
#ifdef TREE_CODE
extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
-extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
extern unsigned int rs6000_special_adjust_field_align (tree, unsigned int);
extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
unsigned int);
&& (int) align < VECTOR_ALIGN (mode)))));
}
-/* Previous GCC releases forced all vector types to have 16-byte alignment. */
-
-bool
-rs6000_special_adjust_field_align_p (tree type, unsigned int computed)
-{
- if (TARGET_ALTIVEC && TREE_CODE (type) == VECTOR_TYPE)
- {
- if (computed != 128)
- {
- static bool warned;
- if (!warned && warn_psabi)
- {
- warned = true;
- inform (input_location,
- "the layout of aggregates containing vectors with"
- " %d-byte alignment has changed in GCC 5",
- computed / BITS_PER_UNIT);
- }
- }
- /* In current GCC there is no special case. */
- return false;
- }
-
- return false;
-}
-
/* AIX word-aligns FP doubles but doubleword-aligns 64-bit ints. */
unsigned int
/* An expression for the alignment of a structure field FIELD if the
alignment computed in the usual way is COMPUTED. */
#define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \
- (rs6000_special_adjust_field_align_p ((TYPE), (COMPUTED)) \
- ? 128 : COMPUTED)
+ (COMPUTED)
#undef BIGGEST_FIELD_ALIGNMENT
+++ /dev/null
-/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
-/* { dg-options "-mabi=elfv2" } */
-
-struct f8
- {
- float x[8];
- };
-
-void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous 'float' aggregates has changed" } */
-{
-}
-
+++ /dev/null
-/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
-
-struct test
- {
- long a __attribute__((aligned (16)));
- };
-
-void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment has changed" } */
-{
-}
-
+++ /dev/null
-/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
-/* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec" } */
-
-struct test
- {
- int a __attribute__((vector_size (8)));
- }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment has changed" } */
-