Skip to content

Commit 2cce905

Browse files
xry111chenhuacai
authored andcommitted
LoongArch: Select ARCH_HAS_FAST_MULTIPLIER
LA464 and LA664 can do 32-bit/64-bit integer multiplication with a latency of 4 cycles and a throughput of 2 ops per cycle. It is comparable to the mainstream x86 and arm64 cores, so we can select ARCH_HAS_FAST_MULTIPLIER like them. It speeds up __sw_hweight32() in lib/hweight.c for about 14% on LA464 and 11% on LA664, while __sw_hweight64() for about 30% on LA464 and 33% on LA664. Signed-off-by: Xi Ruoyao <xry111@xry111.site> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent a38297e commit 2cce905

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/loongarch/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ config LOONGARCH
1616
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
1717
select ARCH_HAS_CPU_FINALIZE_INIT
1818
select ARCH_HAS_CURRENT_STACK_POINTER
19+
select ARCH_HAS_FAST_MULTIPLIER
1920
select ARCH_HAS_FORTIFY_SOURCE
2021
select ARCH_HAS_KCOV
2122
select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS

0 commit comments

Comments
 (0)