Skip to content

Comments

Allow disabling LASX/LSX on LoongArch (loongarch64)#5108

Open
MingcongBai wants to merge 1 commit intorandombit:masterfrom
AOSC-Tracking:upstream/loongarch64-no-simd
Open

Allow disabling LASX/LSX on LoongArch (loongarch64)#5108
MingcongBai wants to merge 1 commit intorandombit:masterfrom
AOSC-Tracking:upstream/loongarch64-no-simd

Conversation

@MingcongBai
Copy link

Some embedded-oriented Loongson processors based on the LoongArch ISA, such as 2K0300 and 2K0500 do not have SIMD support (LSX or LASX), and embedded SoCs such as 2K1000LA/2K1500/2K2000/2K3000/3B6000M do not come with support for LASX.

Add two switches for disabling SIMD extensions. Even when runtime detection is implemented, this saves code sizes.

@coveralls
Copy link

Coverage Status

coverage: 92.0% (+1.3%) from 90.671%
when pulling 29cf657 on AOSC-Tracking:upstream/loongarch64-no-simd
into 14e54e7 on randombit:master.

@randombit
Copy link
Owner

The main reason this flag exists for NEON is for distros (basically just Debian and derivatives) which for whatever reason require their ARMv7 builds to not include NEON at all, even as optional codepaths with feature detection. Does some similar situation apply here?

In general for embedded builds where code size is a concern the recommended approach is to use the option --minimized-build and enable only those modules specifically desirable to the use case.

@MingcongBai
Copy link
Author

The main reason this flag exists for NEON is for distros (basically just Debian and derivatives) which for whatever reason require their ARMv7 builds to not include NEON at all, even as optional codepaths with feature detection. Does some similar situation apply here?

It is also the case here and the platforms diverts - LoongArch desktop/server targets assumes 128-bit vector support, whereas embedded targets have no vector support at all.

MingcongBai added a commit to AOSC-Tracking/botan that referenced this pull request Jan 30, 2026
Some embedded-oriented Loongson processors based on the LoongArch ISA,
such as 2K0300 and 2K0500 do not have SIMD support (LSX or LASX), and
embedded SoCs such as 2K1000LA/2K1500/2K2000/2K3000/3B6000M do not
come with support for LASX.

Add two switches for disabling SIMD extensions. Even when runtime
detection is implemented, this saves code sizes.

[Mingcong Bai: Resolved a minor merge conflict in configure.py]

Link: randombit#5108
Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
Some embedded-oriented Loongson processors based on the LoongArch ISA,
such as 2K0300 and 2K0500 do not have SIMD support (LSX or LASX), and
embedded SoCs such as 2K1000LA/2K1500/2K2000/2K3000/3B6000M do not
come with support for LASX.

Add two switches for disabling SIMD extensions. Even when runtime
detection is implemented, this saves code sizes.

Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
@MingcongBai MingcongBai force-pushed the upstream/loongarch64-no-simd branch from 29cf657 to c662076 Compare January 30, 2026 02:09
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.

4 participants