From ec53fc93d0fbfac2037da571ce5e637ef0c437ee Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Sat, 27 Aug 2005 15:44:26 +0000 Subject: [PATCH] re PR target/23539 (C & C++ compiler generating misaligned references regardless of compiler flags) PR target/23539 * config/rs6000/rs6000.c (expand_block_clear): Use HImode when bytes >= 2 not bytes == 2. (expand_block_move): Same. From-SVN: r103564 --- gcc/ChangeLog | 7 +++++++ gcc/config/rs6000/rs6000.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c8123f27dc2..d37b25e7e30 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-08-27 David Edelsohn + + PR target/23539 + * config/rs6000/rs6000.c (expand_block_clear): Use HImode when + bytes >= 2 not bytes == 2. + (expand_block_move): Same. + 2005-08-27 Richard Guenther PR target/23575 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index edb3d84c522..2ec59fac883 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -9133,7 +9133,7 @@ expand_block_clear (rtx operands[]) clear_bytes = 4; mode = SImode; } - else if (bytes == 2 && (align >= 16 || !STRICT_ALIGNMENT)) + else if (bytes >= 2 && (align >= 16 || !STRICT_ALIGNMENT)) { /* move 2 bytes */ clear_bytes = 2; mode = HImode; @@ -9269,7 +9269,7 @@ expand_block_move (rtx operands[]) mode = SImode; gen_func.mov = gen_movsi; } - else if (bytes == 2 && (align >= 16 || !STRICT_ALIGNMENT)) + else if (bytes >= 2 && (align >= 16 || !STRICT_ALIGNMENT)) { /* move 2 bytes */ move_bytes = 2; mode = HImode;