2 * Licensed to the .NET Foundation under one or more agreements.
3 * The .NET Foundation licenses this file to you under the MIT license.
4 * See the LICENSE file in the project root for more information.
7 #include <mono/utils/mono-hwcap.h>
12 mono_hwcap_arch_init (void)
14 // See arch/riscv/include/uapi/asm/hwcap.h in the kernel source tree.
18 if ((hwcap
= getauxval (AT_HWCAP
))) {
20 if (hwcap
& (1 << ('A' - 'A')))
21 mono_hwcap_riscv_has_stdext_a
= TRUE
;
24 if (hwcap
& (1 << ('C' - 'A')))
25 mono_hwcap_riscv_has_stdext_c
= TRUE
;
28 if (hwcap
& (1 << ('D' - 'A')))
29 mono_hwcap_riscv_has_stdext_d
= TRUE
;
32 if (hwcap
& (1 << ('F' - 'A')))
33 mono_hwcap_riscv_has_stdext_f
= TRUE
;
35 // Why does COMPAT_HWCAP_ISA_I even exist...?
38 if (hwcap
& (1 << ('M' - 'A')))
39 mono_hwcap_riscv_has_stdext_m
= TRUE
;