Hi! 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.
Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks, Bill 2021-05-18 Bill Schmidt <wschm...@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. --- gcc/config/rs6000/freebsd64.h | 10 +++--- gcc/config/rs6000/linux64.h | 8 ++--- gcc/config/rs6000/rs6000-call.c | 31 ++----------------- gcc/config/rs6000/rs6000-protos.h | 1 - gcc/config/rs6000/rs6000.c | 26 ---------------- gcc/config/rs6000/sysv4.h | 3 +- .../gcc.target/powerpc/ppc64-abi-warn-1.c | 12 ------- .../gcc.target/powerpc/ppc64-abi-warn-2.c | 11 ------- .../gcc.target/powerpc/ppc64-abi-warn-3.c | 9 ------ 9 files changed, 10 insertions(+), 101 deletions(-) delete mode 100644 gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c delete mode 100644 gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c delete mode 100644 gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c diff --git a/gcc/config/rs6000/freebsd64.h b/gcc/config/rs6000/freebsd64.h index 11ea22e56c2..7987983d787 100644 --- a/gcc/config/rs6000/freebsd64.h +++ b/gcc/config/rs6000/freebsd64.h @@ -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 diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index e3f2cd254f6..74be9a94524 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -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)) diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c index c4332a61862..f271b0a4079 100644 --- a/gcc/config/rs6000/rs6000-call.c +++ b/gcc/config/rs6000/rs6000-call.c @@ -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); diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index bef727e0a64..9de294d3b28 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -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); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 53a9f5411c7..14c0aa72899 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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 diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index 510abe169c5..23ff59403a3 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -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 diff --git a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c deleted file mode 100644 index ae7d5746b0d..00000000000 --- a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c +++ /dev/null @@ -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" } */ -{ -} - diff --git a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c deleted file mode 100644 index fdbeddfcbba..00000000000 --- a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c +++ /dev/null @@ -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" } */ -{ -} - diff --git a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c deleted file mode 100644 index 22cad0ccd5c..00000000000 --- a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c +++ /dev/null @@ -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" } */ - -- 2.17.1