aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2015-05-20 18:56:14 +0000
committerMax Filippov <jcmvbkbc@gcc.gnu.org>2015-05-20 18:56:14 +0000
commit91767ed11af18ab39fc7a85850ff4908036e416b (patch)
tree3dfe36f601c5749c06ae110f47e03b2d0782edb6 /gcc
parenteb3243e854017b4db99c2e29f9f440ea1630d98b (diff)
downloadgcc-91767ed11af18ab39fc7a85850ff4908036e416b.zip
gcc-91767ed11af18ab39fc7a85850ff4908036e416b.tar.gz
gcc-91767ed11af18ab39fc7a85850ff4908036e416b.tar.bz2
re PR target/65730 (xtensa: ICE in libstdc++-v3/include/bits/atomic_base.h: In function ‘bool std::atomic_flag_test_and_set_explicit(std::__atomic_flag_base*, std::memory_order)’)
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). From-SVN: r223452
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/xtensa/xtensa.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 27435c6..36b8e05 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-20 Max Filippov <jcmvbkbc@gmail.com>
+
+ * config/xtensa/xtensa.c (init_alignment_context): Replace MULT
+ by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT).
+
2015-05-20 Jeff Law <law@redhat.com>
* tree-ssa-threadupdate.c (mark_threaded_blocks): Properly
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 1e8eceb..1f71117 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)),