shepmaster / jetscii

A tiny library to efficiently search strings for sets of ASCII characters and byte slices for sets of bytes.
Apache License 2.0
113 stars 20 forks source link

fix i686 builds #51

Closed cstkingkey closed 2 years ago

shepmaster commented 2 years ago

Can you explain a bit more about how to reproduce the problem? I think I added a 686 build, but it's green, so I'm not following what is currently broken.

cstkingkey commented 2 years ago

when avx feature is enabled for x86 builds, both the fallback and simd implements are disabled which leads to build failure.

shepmaster commented 2 years ago

when avx feature is enabled

We don't use that feature; do you mean sse4.2? Can you tell me which processor is 32-bit and has SSE4.2 support?

cstkingkey commented 2 years ago

when avx feature is enabled

We don't use that feature; do you mean sse4.2? Can you tell me which processor is 32-bit and has SSE4.2 support?

maybe avx imply sse4.2? 32bit software can use avx or sse instruments. it's cpu hardware arch related. in other words, 32bit software can run on 64bit platforms and i 686 here means software arch.

shepmaster commented 2 years ago

Thanks! Can you confirm that this is what you see when the code fails to compile? If so, could you also check that this branch fixes your problem? This uses the SSE4.2 code, even if the processor is x86 and not x86_64.

cstkingkey commented 2 years ago

rustc --print cfg -C target-feature=+avx outputs target_feature="sse4.2"

so enable avx feature will also enable sse4.2.

cstkingkey commented 2 years ago

Thanks! Can you confirm that this is what you see when the code fails to compile? If so, could you also check that this branch fixes your problem? This uses the SSE4.2 code, even if the processor is x86 and not x86_64.

yes and yes.

shepmaster commented 2 years ago

In that case, what do you think about closing this in favor of #52?

cstkingkey commented 2 years ago

In that case, what do you think about closing this in favor of #52?

it's ok.

shepmaster commented 2 years ago

Released in 0.5.2