Avoid leaking x86_64 SSE2 paths into forced RISC-V probes#127
Open
carlosqwqqwq wants to merge 1 commit into
Open
Avoid leaking x86_64 SSE2 paths into forced RISC-V probes#127carlosqwqqwq wants to merge 1 commit into
carlosqwqqwq wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
vorbisalready has a portable scalar fallback inlib/os.h, but the x86_64 SSE2 fast path was still too loosely gated for portability verification.The concrete problem is that a forced
riscv64smoke build on an x86_64 host could still inherit the host-only SSE2 path:emmintrin.hand_mm_cvtsd_si32;This patch keeps the codec logic unchanged and tightens the architecture gate so the existing generic fallback is what gets exercised for RISC-V portability checks.
What changed
lib/os.h:__riscv, so portability smoke tests do not inherit the host x86_64 SSE2 path.README.md:riscv64use the generic scalar fallback.Verification
ubuntu:24.04):lib/os.hwith forced__riscv=1and__riscv_xlen=64;return (int)floor(f+.5);;emmintrin.hor_mm_cvtsd_si32;cmake -S /work -B /work/build-native -G Ninja -DCMAKE_BUILD_TYPE=Releasecmake --build /work/build-native --parallel 4ctest --test-dir /work/build-native --output-on-failure2/2tests passed.riscv64Linux cross-compilation and test execution in Docker:xiph/oggforriscv64and installed it to/opt/riscv-ogg;vorbiswithriscv64-linux-gnu-gcc,CMAKE_SYSTEM_PROCESSOR=riscv64, andOGG_ROOT=/opt/riscv-ogg;ctest --test-dir /work/build-riscv --output-on-failure;2/2tests passed.riscv64-linux-gnu-readelf -h /work/build-riscv/test/vorbis_testriscv64-linux-gnu-readelf -h /work/build-riscv/test/test_codebookMachine: RISC-V.Notes
vorbisuses and validates its existing portable scalar path correctly for RISC-V-oriented builds, not to change codec behavior or claim new architecture-specific acceleration.