diff options
| author | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-15 07:22:10 +0000 |
|---|---|---|
| committer | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-15 07:22:10 +0000 |
| commit | c541f3afea5f614a05e44ca3e9b2a007b1a10a41 (patch) | |
| tree | 68441a56b11856966154a0bb679e8533b594c0fe | |
| parent | e3b2d87b48302838c4651dd3beb400c4a6481071 (diff) | |
| download | ppe42-gcc-c541f3afea5f614a05e44ca3e9b2a007b1a10a41.tar.gz ppe42-gcc-c541f3afea5f614a05e44ca3e9b2a007b1a10a41.zip | |
PR target/25406
* config/rs6000/rs6000.c (rs6000_special_round_type_align): Handle
error_mark_node. Make alignment params unsigned.
* config/rs6000/rs6000-protos.h
(rs6000_special_round_type_align): Update prototype.
(rs6000_machopic_legitimize_pic_address): Remove arg names.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108562 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 9 | ||||
| -rw-r--r-- | gcc/config/rs6000/rs6000-protos.h | 9 | ||||
| -rw-r--r-- | gcc/config/rs6000/rs6000.c | 20 |
3 files changed, 26 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 71260a2d134..0546407d0c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2005-12-15 Alan Modra <amodra@bigpond.net.au> + + PR target/25406 + * config/rs6000/rs6000.c (rs6000_special_round_type_align): Handle + error_mark_node. Make alignment params unsigned. + * config/rs6000/rs6000-protos.h + (rs6000_special_round_type_align): Update prototype. + (rs6000_machopic_legitimize_pic_address): Remove arg names. + 2005-12-14 Ulrich Weigand <uweigand@de.ibm.com> PR rtl-optimization/25310 diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index dbde3d50a1b..a7cc3a6ddc1 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -105,14 +105,13 @@ extern rtx rs6000_return_addr (int, rtx); extern void rs6000_output_symbol_ref (FILE*, rtx); extern HOST_WIDE_INT rs6000_initial_elimination_offset (int, int); -extern rtx rs6000_machopic_legitimize_pic_address (rtx orig, - enum machine_mode mode, - rtx reg); - +extern rtx rs6000_machopic_legitimize_pic_address (rtx, enum machine_mode, + rtx); #endif /* RTX_CODE */ #ifdef TREE_CODE -extern unsigned int rs6000_special_round_type_align (tree, int, int); +extern unsigned int rs6000_special_round_type_align (tree, unsigned int, + unsigned int); extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int, int); extern int function_arg_boundary (enum machine_mode, tree); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 9f547dab057..e196279cac5 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -2505,21 +2505,27 @@ invalid_e500_subreg (rtx op, enum machine_mode mode) field is an FP double while the FP fields remain word aligned. */ unsigned int -rs6000_special_round_type_align (tree type, int computed, int specified) +rs6000_special_round_type_align (tree type, unsigned int computed, + unsigned int specified) { + unsigned int align = MAX (computed, specified); tree field = TYPE_FIELDS (type); /* Skip all non field decls */ while (field != NULL && TREE_CODE (field) != FIELD_DECL) field = TREE_CHAIN (field); - 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); + if (field != NULL && field != type) + { + type = TREE_TYPE (field); + while (TREE_CODE (type) == ARRAY_TYPE) + type = TREE_TYPE (type); + + if (type != error_mark_node && TYPE_MODE (type) == DFmode) + align = MAX (align, 64); + } - return MAX (MAX (computed, specified), 64); + return align; } /* Return 1 for an operand in small memory on V.4/eabi. */ |

