Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ This package contains:
- libvorbisenc, a BSD-style license library that provides a simple,
programmatic encoding setup interface

- the generic scalar fallback used on non-x86 targets such as `riscv64`

- example code making use of libogg, libvorbis, libvorbisfile and
libvorbisenc

Expand Down
6 changes: 4 additions & 2 deletions lib/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ static __inline void vorbis_fpu_restore(vorbis_fpu_control fpu){


/* Optimized code path for x86_64 builds. Uses SSE2 intrinsics. This can be
done safely because all x86_64 CPUs supports SSE2. */
#if (defined(_MSC_VER) && (defined(_M_X64) && !defined(_M_ARM64EC))) || (defined(__GNUC__) && defined (__SSE2_MATH__))
done safely because all x86_64 CPUs supports SSE2. Keep it gated on x86_64
only, and explicitly step aside when a forced non-x86 target probe defines
__riscv on an x86_64 host for portability smoke testing. */
#if (defined(_MSC_VER) && (defined(_M_X64) && !defined(_M_ARM64EC))) || (defined(__GNUC__) && defined(__x86_64__) && defined(__SSE2_MATH__) && !defined(__riscv))
# define VORBIS_FPU_CONTROL

typedef ogg_int16_t vorbis_fpu_control;
Expand Down