diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-03 13:14:30 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-03 13:14:30 +0000 |
commit | 313e45cd4ffd4b8d37f3b02bb67699f1c5bfdf06 (patch) | |
tree | 855a25048f055dd4070d6472ee2ea1ad3ae5afc4 /configure.in | |
parent | aafa14b4e8e0340b5bc1ab6bcbd76f5e5435e15f (diff) | |
download | ruby-313e45cd4ffd4b8d37f3b02bb67699f1c5bfdf06.tar.gz |
* string.c (count_utf8_lead_bytes_with_word): Use __builtin_popcount
only if it can use SSE 4.2 POPCNT whose latency is 3 cycle.
* internal.h (rb_popcount64): use __builtin_popcountll because now
it is in fast path.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 14711a6837..ad8cc988c4 100644 --- a/configure.in +++ b/configure.in @@ -2429,6 +2429,8 @@ fi]) RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap16, [__builtin_bswap16(0)]) RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap32, [__builtin_bswap32(0)]) RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap64, [__builtin_bswap64(0)]) +RUBY_CHECK_BUILTIN_FUNC(__builtin_popcount, [__builtin_popcount(0)]) +RUBY_CHECK_BUILTIN_FUNC(__builtin_popcountll, [__builtin_popcountll(0)]) RUBY_CHECK_BUILTIN_FUNC(__builtin_clz, [__builtin_clz(0)]) RUBY_CHECK_BUILTIN_FUNC(__builtin_clzl, [__builtin_clzl(0)]) RUBY_CHECK_BUILTIN_FUNC(__builtin_clzll, [__builtin_clzll(0)]) |