]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Implement __init_loongarch_features_resolver.
authorLulu Cheng <chenglulu@loongson.cn>
Sat, 20 Sep 2025 02:11:35 +0000 (10:11 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Tue, 11 Nov 2025 07:33:37 +0000 (15:33 +0800)
commit4fa46c8adf40a596ff13b8db65c6e61eb019847e
treee89a203254596c0cab686b641e3ff7bdb9519652
parent8e4d9013007d160b51f6026b4b3e3b8220f2f683
LoongArch: Implement __init_loongarch_features_resolver.

This patch can obtain the CPUCFG and HWCAP value at runtime and
extract the flag bits of features for function selection.
HWCAP is used to obtain the support of LSX and LASX because the
kernel can control the enable/disable of these two features.

Note that this requires glibc version 2.38 or higher to compile
and run.

libgcc/ChangeLog:

* config/loongarch/t-loongarch64: Add cpuinfo.c to LIB2ADD.
* config/loongarch/cpuinfo.c: New file.
libgcc/config/loongarch/cpuinfo.c [new file with mode: 0644]
libgcc/config/loongarch/t-loongarch64