diff --git a/arch/arm/src/armv8-r/Toolchain.defs b/arch/arm/src/armv8-r/Toolchain.defs index a7927f18bb14a..b16f47337554d 100644 --- a/arch/arm/src/armv8-r/Toolchain.defs +++ b/arch/arm/src/armv8-r/Toolchain.defs @@ -22,12 +22,18 @@ ARCHCPUFLAGS += -march=armv8-r ifeq ($(CONFIG_ARCH_FPU),y) LLVM_ABITYPE := eabihf - ARCHCPUFLAGS += -mfpu=vfpv3-d16 - ifeq ($(CONFIG_ARM_FPU_ABI_SOFT),y) - ARCHCPUFLAGS += -mfloat-abi=softfp + + ifeq ($(CONFIG_ARCH_CORTEXR52)$(CONFIG_ARM_NEON),yy) + ARCHCPUFLAGS += -mfpu=neon-fp-armv8 else - ARCHCPUFLAGS += -mfloat-abi=hard + ARCHCPUFLAGS += -mfpu=fpv5-sp-d16 + ifeq ($(CONFIG_ARM_FPU_ABI_SOFT),y) + ARCHCPUFLAGS += -mfloat-abi=softfp + else + ARCHCPUFLAGS += -mfloat-abi=hard + endif endif + else LLVM_ABITYPE := eabi ARCHCPUFLAGS += -mfloat-abi=soft diff --git a/arch/arm/src/cmake/armv8-r.cmake b/arch/arm/src/cmake/armv8-r.cmake index 9b026c72be43c..5f99b54d8f2f9 100644 --- a/arch/arm/src/cmake/armv8-r.cmake +++ b/arch/arm/src/cmake/armv8-r.cmake @@ -25,11 +25,16 @@ if(CONFIG_ARCH_CORTEXR52) endif() if(CONFIG_ARCH_FPU) - list(APPEND PLATFORM_FLAGS -mfpu=vfpv3-d16) - if(CONFIG_ARM_FPU_ABI_SOFT) - list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp) + + if(CONFIG_ARCH_CORTEXR52 AND CONFIG_ARM_NEON) + list(APPEND PLATFORM_FLAGS -mfpu=neon-fp-armv8) else() - list(APPEND PLATFORM_FLAGS -mfloat-abi=hard) + list(APPEND PLATFORM_FLAGS -mfpu=fpv5-sp-d16) + if(CONFIG_ARM_FPU_ABI_SOFT) + list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp) + else() + list(APPEND PLATFORM_FLAGS -mfloat-abi=hard) + endif() endif() else() list(APPEND PLATFORM_FLAGS -mfloat-abi=soft)