From: Jakub Jelinek Date: Thu, 8 Aug 2002 17:52:40 +0000 (+0200) Subject: rs6000.h, [...]: Revert last two patches. X-Git-Tag: releases/gcc-3.2.0~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7a66836455e9c90d00d7f6ebc9f80c6a28c8fcc;p=thirdparty%2Fgcc.git rs6000.h, [...]: Revert last two patches. * config/rs6000/rs6000.h, config/rs6000/aix.h, config/rs6000/darwin.h, config/rs6000/linux64.h: Revert last two patches. * config/rs6000/sysv4.h: Likewise, remove #undef ADJUST_FIELD_ALIGN. From-SVN: r56134 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a20aa984ff0..7e45a24ad2fd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-08-08 Jakub Jelinek + + * config/rs6000/rs6000.h, config/rs6000/aix.h, + config/rs6000/darwin.h, config/rs6000/linux64.h: Revert last + two patches. + * config/rs6000/sysv4.h: Likewise, remove #undef ADJUST_FIELD_ALIGN. + 2002-08-08 Jakub Jelinek * config/rs6000/rs6000-protos.h (rs6000_field_alignment): Remove. diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h index cd069d7a8d5c..d8dde5bbba81 100644 --- a/gcc/config/rs6000/aix.h +++ b/gcc/config/rs6000/aix.h @@ -103,6 +103,13 @@ Boston, MA 02111-1307, USA. */ #define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\ %{p:-L/lib/profiled -L/usr/lib/profiled} %{!shared:%{g*:-lg}} -lc" +/* AIX word-aligns FP doubles but doubleword-aligns 64-bit ints. */ +#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ + (TYPE_MODE (TREE_CODE (TREE_TYPE (FIELD)) == ARRAY_TYPE \ + ? get_inner_array_type (FIELD) \ + : TREE_TYPE (FIELD)) == DFmode \ + ? MIN ((COMPUTED), 32) : (COMPUTED)) + /* AIX increases natural record alignment to doubleword if the first field is an FP double while the FP fields remain word aligned. */ #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \ diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index 1fae4d164788..81c24e76814b 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -205,6 +205,13 @@ Boston, MA 02111-1307, USA. */ /* Fix for emit_group_load (): force large constants to be pushed via regs. */ #define ALWAYS_PUSH_CONSTS_USING_REGS_P 1 +/* Darwin word-aligns FP doubles but doubleword-aligns 64-bit ints. */ +#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ + (TYPE_MODE (TREE_CODE (TREE_TYPE (FIELD)) == ARRAY_TYPE \ + ? get_inner_array_type (FIELD) \ + : TREE_TYPE (FIELD)) == DFmode \ + ? MIN ((COMPUTED), 32) : (COMPUTED)) + /* Darwin increases natural record alignment to doubleword if the first field is an FP double while the FP fields remain word aligned. */ #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \ diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index cab4be91e461..f84e1e3a8334 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -64,6 +64,13 @@ Boston, MA 02111-1307, USA. */ #define USER_LABEL_PREFIX "" +/* AIX word-aligns FP doubles but doubleword-aligns 64-bit ints. */ +#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ + (TYPE_MODE (TREE_CODE (TREE_TYPE (FIELD)) == ARRAY_TYPE \ + ? get_inner_array_type (FIELD) \ + : TREE_TYPE (FIELD)) == DFmode \ + ? MIN ((COMPUTED), 32) : (COMPUTED)) + /* AIX increases natural record alignment to doubleword if the first field is an FP double while the FP fields remain word aligned. */ #undef ROUND_TYPE_ALIGN diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index be1028976217..8c77dd558c06 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -638,15 +638,6 @@ extern int rs6000_altivec_abi; /* A bitfield declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 -/* Most ABIs word-align FP doubles but doubleword-align 64-bit ints. */ -#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ - (DEFAULT_ABI == ABI_V4 \ - ? ((TARGET_ALTIVEC \ - && TREE_CODE (get_inner_array_type (FIELD)) == VECTOR_TYPE) \ - ? 128 : (COMPUTED)) \ - : ((TYPE_MODE (get_inner_array_type (FIELD)) == DFmode) \ - ? MIN (32, (COMPUTED)) : (COMPUTED))) - /* Make strings word-aligned so strcpy from constants will be faster. Make vector constants quadword aligned. */ #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index f55588675423..9274d8fda690 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -387,6 +387,12 @@ do { \ #undef BIGGEST_ALIGNMENT #define BIGGEST_ALIGNMENT ((TARGET_EABI && !TARGET_ALTIVEC) ? 64 : 128) +/* 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, COMPUTED) \ + ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \ + ? 128 : COMPUTED) + /* Define this macro as an expression for the alignment of a type (given by TYPE as a tree node) if the alignment computed in the usual way is COMPUTED and the alignment explicitly specified was