summaryrefslogtreecommitdiff
path: root/gcc/config/xtensa
diff options
context:
space:
mode:
authorjcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-20 18:56:14 +0000
committerjcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-20 18:56:14 +0000
commit64ab0923b1cf6dc35be1f49f2b6ee8cf0a744918 (patch)
tree3dfe36f601c5749c06ae110f47e03b2d0782edb6 /gcc/config/xtensa
parente5a371fd3194014d6a791cd32a37554a9026cec7 (diff)
downloadgcc-64ab0923b1cf6dc35be1f49f2b6ee8cf0a744918.tar.gz
Fix PR target/65730
2015-05-20 Max Filippov <jcmvbkbc@gmail.com> gcc/ * config/xtensa/xtensa.c (init_alignment_context): Replace MULT by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223452 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/xtensa')
-rw-r--r--gcc/config/xtensa/xtensa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 1e8ecebc353..1f71117f453 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -1461,8 +1461,9 @@ init_alignment_context (struct alignment_context *ac, rtx mem)
if (ac->shift != NULL_RTX)
{
/* Shift is the byte count, but we need the bitcount. */
- ac->shift = expand_simple_binop (SImode, MULT, ac->shift,
- GEN_INT (BITS_PER_UNIT),
+ gcc_assert (exact_log2 (BITS_PER_UNIT) >= 0);
+ ac->shift = expand_simple_binop (SImode, ASHIFT, ac->shift,
+ GEN_INT (exact_log2 (BITS_PER_UNIT)),
NULL_RTX, 1, OPTAB_DIRECT);
ac->modemask = expand_simple_binop (SImode, ASHIFT,
GEN_INT (GET_MODE_MASK (mode)),