Skip to content

Commit 6590696

Browse files
martinjaegerfabiobaltieri
authored andcommitted
arch: arm: core: Kconfig: introduce CONFIG_FP16_ARITHMETIC
This allows to distinguish between f16 storage format support (CONFIG_FP16) and actual f16 arithmetic capability. CONFIG_FP16_ARITHMETIC requires either MVE float (ARMV8_1_M_MVEF) or a Cortex-A core (CPU_CORTEX_A). Signed-off-by: Martin Jäger <martin.jaeger@a-labs.io>
1 parent 0bf99fa commit 6590696

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

arch/arm/core/Kconfig

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ config FP_SOFTABI
311311
endchoice
312312

313313
config FP16
314-
bool "Half-precision floating point support"
314+
bool "Half-precision floating point storage support"
315315
default y
316316
help
317317
This option enables the half-precision (16-bit) floating point support
@@ -343,6 +343,17 @@ config FP16_ALT
343343

344344
endchoice
345345

346+
config FP16_ARITHMETIC
347+
bool "Half-precision floating point arithmetic support"
348+
default y
349+
depends on FP16
350+
depends on ARMV8_1_M_MVEF || CPU_CORTEX_A
351+
help
352+
This option indicates that the target supports half-precision
353+
(16-bit) floating-point arithmetic. This requires hardware with
354+
native f16 arithmetic capability, such as Cortex-M processors
355+
with MVE float or Cortex-A processors with NEON.
356+
346357
rsource "cortex_m/Kconfig"
347358
rsource "cortex_a_r/Kconfig"
348359

0 commit comments

Comments
 (0)