Skip to content

Commit bf5bf9a

Browse files
hsbtclaude
andcommitted
json: Use SSE2 on x86-64 without checking at runtime
__builtin_cpu_supports refers to __cpu_model in compiler-rt, which clang-cl does not link, so generator.so and parser.so failed with an undefined symbol. SSE2 is part of the x86-64 baseline, as NEON is for AArch64, where no check is made either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a15b2ba commit bf5bf9a

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎ext/json/ext/simd/simd.h‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,8 @@ ALWAYS_INLINE(static) TARGET_SSE2 int string_scan_simd_sse2(const char **ptr, co
187187

188188
static inline SIMD_Implementation find_simd_implementation(void)
189189
{
190-
// TODO Revisit. I think the SSE version now only uses SSE2 instructions.
191-
if (__builtin_cpu_supports("sse2")) {
192-
return SIMD_SSE2;
193-
}
194-
195-
return SIMD_NONE;
190+
// SSE2 is part of the x86-64 baseline.
191+
return SIMD_SSE2;
196192
}
197193

198194
#endif /* HAVE_X86INTRIN_H */

0 commit comments

Comments
 (0)