rs6000: Remove old psabi warnings
Long ago we were forced to make some small ABI breaks to correct errors in the implementation, and we added warning messages for the changes from GCC 4.9 to GCC 5. Enough time has passed that these are now just irritants, so let's remove them. Also clean up associated macros using rs6000_special_adjust_field_align_p, which has been always returning false for a long time. 2021-05-18 Bill Schmidt <wschmidt@linux.ibm.com> gcc/ * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Remove call to rs6000_special_adjust_field_align_p. * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/rs6000-call.c (rs6000_function_arg_boundary): Remove ABI warning. (rs6000_function_arg): Likewise. * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p): Remove prototype. * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): Remove. * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Remove call to rs6000_special_adjust_field_align_p. gcc/testsuite/ * gcc.target/powerpc/ppc64-abi-warn-1.c: Remove. * gcc.target/powerpc/ppc64-abi-warn-2.c: Remove. * gcc.target/powerpc/ppc64-abi-warn-3.c: Remove.
This commit is contained in:
parent
5c66a1a300
commit
79cf0004ff
|
@ -306,12 +306,10 @@ extern int dot_symbols;
|
|||
/* 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
|
||||
|
|
|
@ -213,11 +213,9 @@ extern int dot_symbols;
|
|||
/* 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))
|
||||
|
||||
|
|
|
@ -6793,25 +6793,8 @@ rs6000_function_arg_boundary (machine_mode mode, const_tree type)
|
|||
/* "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;
|
||||
}
|
||||
|
||||
|
@ -7805,8 +7788,6 @@ rs6000_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
|
|||
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);
|
||||
|
||||
|
@ -7820,14 +7801,6 @@ rs6000_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
|
|||
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);
|
||||
|
|
|
@ -226,7 +226,6 @@ address_is_prefixed (rtx addr,
|
|||
|
||||
#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);
|
||||
|
|
|
@ -7900,32 +7900,6 @@ rs6000_slow_unaligned_access (machine_mode mode, unsigned int align)
|
|||
&& (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
|
||||
|
|
|
@ -325,8 +325,7 @@ do { \
|
|||
/* 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
|
||||
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
/* { 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" } */
|
||||
{
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
/* { 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" } */
|
||||
{
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
/* { 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" } */
|
||||
|
Loading…
Reference in New Issue