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
This commit is contained in:
David Edelsohn 2005-08-27 15:44:26 +00:00 committed by David Edelsohn
parent f013cadc88
commit ec53fc93d0
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2005-08-27 David Edelsohn <edelsohn@gnu.org>
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 <rguenther@suse.de>
PR target/23575

View File

@ -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;