diff options
author | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-12 01:28:50 +0000 |
---|---|---|
committer | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-12 01:28:50 +0000 |
commit | dea85af0694ac9352e8e40b0d878c82cefa417f6 (patch) | |
tree | f2719b842679a682a127c083311a8867c67b1104 /gcc/config/rs6000 | |
parent | f6b0ef0c11812bb47c666e44d7832d8933d65143 (diff) | |
download | gcc-dea85af0694ac9352e8e40b0d878c82cefa417f6.tar.gz |
PR target/25299
* config/rs6000/rs6000.c (rs6000_special_round_type_align): Increase
alignment to doubleword if the first field is a double array.
* config/rs6000/linux64.h (TARGET_ALIGN_NATURAL): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108393 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r-- | gcc/config/rs6000/linux64.h | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index 1555d2968a7..bc615e8c96d 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -236,6 +236,12 @@ extern int dot_symbols; ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \ : MAX ((COMPUTED), (SPECIFIED))) +/* Use the default for compiling target libs. */ +#ifdef IN_TARGET_LIBS +#undef TARGET_ALIGN_NATURAL +#define TARGET_ALIGN_NATURAL 1 +#endif + /* Indicate that jump tables go in the text section. */ #undef JUMP_TABLES_IN_TEXT_SECTION #define JUMP_TABLES_IN_TEXT_SECTION TARGET_64BIT diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 609de947d3e..9f547dab057 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -2513,7 +2513,10 @@ rs6000_special_round_type_align (tree type, int computed, int specified) while (field != NULL && TREE_CODE (field) != FIELD_DECL) field = TREE_CHAIN (field); - if (field == NULL || field == type || DECL_MODE (field) != DFmode) + if (field == NULL || field == type + || TYPE_MODE (TREE_CODE (TREE_TYPE (field)) == ARRAY_TYPE + ? get_inner_array_type (field) + : TREE_TYPE (field)) != DFmode) return MAX (computed, specified); return MAX (MAX (computed, specified), 64); |