Skip to content

LoongArch64: Fix build with multiple bit depths - #941

Merged
kirithika7 merged 1 commit into
Multicorewareinc:masterfrom
setarcos:loongarch
Aug 12, 2026
Merged

LoongArch64: Fix build with multiple bit depths#941
kirithika7 merged 1 commit into
Multicorewareinc:masterfrom
setarcos:loongarch

Conversation

@setarcos

@setarcos setarcos commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

The loongarch64 assembly files are only compiled for 8-bit builds (CMakeLists.txt: LOONGARCH64 AND NOT HIGH_BIT_DEPTH). However, asm-primitives.cpp was compiled for all bit depths, causing compilation errors in 10-bit and 12-bit builds because the assembly functions with PFX() namespace prefix don't exist for those depths.

Fix by wrapping all loongarch64-specific PFX-dependent code in #if !HIGH_BIT_DEPTH guard, and providing an empty setupAssemblyPrimitives for HIGH_BIT_DEPTH builds.

The loongarch64 assembly files are only compiled for 8-bit builds
(CMakeLists.txt: LOONGARCH64 AND NOT HIGH_BIT_DEPTH). However,
asm-primitives.cpp was compiled for all bit depths, causing compilation
errors in 10-bit and 12-bit builds because the assembly functions with
PFX() namespace prefix don't exist for those depths.

Fix by wrapping all loongarch64-specific PFX-dependent code in #if !HIGH_BIT_DEPTH
guard, and providing an empty setupAssemblyPrimitives for HIGH_BIT_DEPTH builds.

Signed-off-by: Pluto Yang <yangyj.ee@gmail.com>
setarcos added a commit to lcpu-club/loongarch-packages that referenced this pull request Aug 8, 2026
* Fix build with multiple bit depths.
  See also: Multicorewareinc/x265#941
@kirithika7
kirithika7 requested a review from mcw-Lavanya August 11, 2026 04:45

@mcw-Lavanya mcw-Lavanya left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me

@kirithika7
kirithika7 merged commit af35fda into Multicorewareinc:master Aug 12, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants