Skip to content

Commit 70927af

Browse files
committed
Fix __riscv_flen mask.
1 parent 0590dba commit 70927af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libc/src/__support/macros/properties/cpu_features.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@
6161

6262
#if defined(__riscv_flen)
6363
// https://github.com/riscv-non-isa/riscv-c-api-doc/blob/main/src/c-api.adoc
64-
#if (__riscv_flen & 0x20)
64+
#if (__riscv_flen & 0x10)
6565
#define LIBC_TARGET_CPU_HAS_RISCV_FPU_HALF
6666
#define LIBC_TARGET_CPU_HAS_FPU_HALF
6767
#endif // LIBC_TARGET_CPU_HAS_RISCV_FPU_HALF
68-
#if (__riscv_flen & 0x40)
68+
#if (__riscv_flen & 0x20)
6969
#define LIBC_TARGET_CPU_HAS_RISCV_FPU_FLOAT
7070
#define LIBC_TARGET_CPU_HAS_FPU_FLOAT
7171
#endif // LIBC_TARGET_CPU_HAS_RISCV_FPU_FLOAT
72-
#if (__riscv_flen & 0x80)
72+
#if (__riscv_flen & 0x40)
7373
#define LIBC_TARGET_CPU_HAS_RISCV_FPU_DOUBLE
7474
#define LIBC_TARGET_CPU_HAS_FPU_DOUBLE
7575
#endif // LIBC_TARGET_CPU_HAS_RISCV_FPU_DOUBLE

0 commit comments

Comments
 (0)