aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2017-03-21 11:10:17 +0000
committerAndreas Schwab <schwab@gcc.gnu.org>2017-03-21 11:10:17 +0000
commit8c00ae2406531c22960650d2d2b0687b71fde52b (patch)
treec5ce45da3dace2d3a0cd80a3da4b5b1538b54867 /libcpp
parent9d60683aa0cbeb57f835e30b2e2604c2025ffd70 (diff)
downloadgcc-8c00ae2406531c22960650d2d2b0687b71fde52b.zip
gcc-8c00ae2406531c22960650d2d2b0687b71fde52b.tar.gz
gcc-8c00ae2406531c22960650d2d2b0687b71fde52b.tar.bz2
Fix search_line_fast for aarch64/ILP32
* lex.c (search_line_fast) [__ARM_NEON && __ARM_64BIT_STATE]: Convert 64-bit value to boolean before passing to __builtin_expect. From-SVN: r246312
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog6
-rw-r--r--libcpp/lex.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 5c4b7a0..95200da 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,9 @@
+2017-03-21 Andreas Schwab <schwab@suse.de>
+
+ * lex.c (search_line_fast) [__ARM_NEON && __ARM_64BIT_STATE]:
+ Convert 64-bit value to boolean before passing to
+ __builtin_expect.
+
2017-03-16 Jason Merrill <jason@redhat.com>
* init.c (cpp_init_builtins): Update __cplusplus for C++17.
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 8a8c79c..a431ac8 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -821,7 +821,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
v = vorrq_u8 (t, vceqq_u8 (data, repl_bs));
w = vorrq_u8 (u, vceqq_u8 (data, repl_qm));
t = vorrq_u8 (v, w);
- if (__builtin_expect (vpaddd_u64 ((uint64x2_t)t), 0))
+ if (__builtin_expect (vpaddd_u64 ((uint64x2_t)t) != 0, 0))
goto done;
}