aboutsummaryrefslogtreecommitdiff
path: root/libcpp/lex.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2012-06-19 18:28:50 +0200
committerUros Bizjak <uros@gcc.gnu.org>2012-06-19 18:28:50 +0200
commitd35d1c0fee58f7b141f535cb0f4800c471a6b00d (patch)
tree028f8fa18b1a8c50463396c4ef422231d60c8198 /libcpp/lex.c
parentbbe10a06e013c577005a6cae646095947bfdd277 (diff)
downloadgcc-d35d1c0fee58f7b141f535cb0f4800c471a6b00d.zip
gcc-d35d1c0fee58f7b141f535cb0f4800c471a6b00d.tar.gz
gcc-d35d1c0fee58f7b141f535cb0f4800c471a6b00d.tar.bz2
lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and __builtin_ia32_pcmpestri128 instead of asm.
* lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and __builtin_ia32_pcmpestri128 instead of asm. From-SVN: r188782
Diffstat (limited to 'libcpp/lex.c')
-rw-r--r--libcpp/lex.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 98ee4e9..ab904db 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;