summaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-19 16:28:50 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-19 16:28:50 +0000
commit112f073cffee626cdf3f7a0e0f58b6a46ea7ab4d (patch)
tree028f8fa18b1a8c50463396c4ef422231d60c8198 /libcpp
parent952d78fc796b249a3c32d306c6b94a46f5af56b4 (diff)
downloadgcc-112f073cffee626cdf3f7a0e0f58b6a46ea7ab4d.tar.gz
* lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and
__builtin_ia32_pcmpestri128 instead of asm. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188782 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog5
-rw-r--r--libcpp/lex.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index fb4bac63f7b..312fd8d97b8 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-19 Uros Bizjak <ubizjak@gmail.com>
+
+ * lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and
+ __builtin_ia32_pcmpestri128 instead of asm.
+
2012-06-04 Dimitrios Apostolou <jimis@gmx.net>
* line-map.c (linemap_enter_macro): Don't zero max_column_hint in
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 98ee4e92da3..ab904db58be 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -427,6 +427,8 @@ search_line_sse42 (const uchar *s, const uchar *end)
/* Check for unaligned input. */
if (si & 15)
{
+ v16qi sv;
+
if (__builtin_expect (end - s < 16, 0)
&& __builtin_expect ((si & 0xfff) > 0xff0, 0))
{
@@ -439,8 +441,9 @@ search_line_sse42 (const uchar *s, const uchar *end)
/* ??? The builtin doesn't understand that the PCMPESTRI read from
memory need not be aligned. */
- __asm ("%vpcmpestri $0, (%1), %2"
- : "=c"(index) : "r"(s), "x"(search), "a"(4), "d"(16));
+ sv = __builtin_ia32_loaddqu ((const char *) s);
+ index = __builtin_ia32_pcmpestri128 (search, 4, sv, 16, 0);
+
if (__builtin_expect (index < 16, 0))
goto found;