From 2b8cb090b60715343d356d6c3e6d1273c7b096f3 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Wed, 16 Sep 2015 11:26:52 -0700 Subject: [PATCH] Limit declaration of GroupVarint tables to SSE >= 2 Summary: __m128i is only available in SSE 2 and later. We technically only use it in folly/GroupVarint.h for SSE 3+, but that's due to various other intrinsics and we could potentially lower the requirement in certain contexts, so do the right thing in the generated table. Revisit the uses in folly/GroupVarint.h later. Reviewed By: @yfeldblum Differential Revision: D2445798 --- folly/build/generate_varint_tables.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/build/generate_varint_tables.py b/folly/build/generate_varint_tables.py index 8fe9cd79..c2c9dbf7 100755 --- a/folly/build/generate_varint_tables.py +++ b/folly/build/generate_varint_tables.py @@ -54,7 +54,7 @@ def generate(f): f.write(""" #include -#if FOLLY_X64 || defined(__i386__) +#if (FOLLY_X64 || defined(__i386__)) && (FOLLY_SSE >= 2) #include #include @@ -98,7 +98,7 @@ extern const __m128i groupVarintSSEMasks[] = { } // namespace detail } // namespace folly -#endif /* FOLLY_X64 || defined(__i386__) */ +#endif /* (FOLLY_X64 || defined(__i386__)) && (FOLLY_SSE >= 2) */ """) def main(): -- 2.34.1