mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
armv8-r/r52: add neon support into compiler line
1. correct the armv8-r fpu flag from vfpv3-d16 to fpv5-sp-d16 2. add neon support This commit updates the build script to specify the FPU type of `fpv5-sp-d16` when the processor is configured with a single-precision FPU, and `neon-fp-armv8` when the processor is configured with a double-precision + Advanced SIMD-capable FPU. Note that the `fp-armv8` FPU type is an alias for double-precision FPv5 with 32 double-precision registers (refer to the GCC `gcc/config/arm/arm-cpus.in` for more details); NEON is always specified in case of a double-precision configuration because the Cortex-R52 can only be configured as such. Reference: https://developer.arm.com/Processors/Cortex-R52 Instruction set: Arm and Thumb-2. Supports DSP instructions and a configurable Floating-Point Unit either with single-precision or double precision and Neon. Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
@@ -22,12 +22,18 @@ ARCHCPUFLAGS += -march=armv8-r
|
|||||||
|
|
||||||
ifeq ($(CONFIG_ARCH_FPU),y)
|
ifeq ($(CONFIG_ARCH_FPU),y)
|
||||||
LLVM_ABITYPE := eabihf
|
LLVM_ABITYPE := eabihf
|
||||||
ARCHCPUFLAGS += -mfpu=vfpv3-d16
|
|
||||||
|
ifeq ($(CONFIG_ARCH_CORTEXR52)$(CONFIG_ARM_NEON),yy)
|
||||||
|
ARCHCPUFLAGS += -mfpu=neon-fp-armv8
|
||||||
|
else
|
||||||
|
ARCHCPUFLAGS += -mfpu=fpv5-sp-d16
|
||||||
|
endif
|
||||||
ifeq ($(CONFIG_ARM_FPU_ABI_SOFT),y)
|
ifeq ($(CONFIG_ARM_FPU_ABI_SOFT),y)
|
||||||
ARCHCPUFLAGS += -mfloat-abi=softfp
|
ARCHCPUFLAGS += -mfloat-abi=softfp
|
||||||
else
|
else
|
||||||
ARCHCPUFLAGS += -mfloat-abi=hard
|
ARCHCPUFLAGS += -mfloat-abi=hard
|
||||||
endif
|
endif
|
||||||
|
|
||||||
else
|
else
|
||||||
LLVM_ABITYPE := eabi
|
LLVM_ABITYPE := eabi
|
||||||
ARCHCPUFLAGS += -mfloat-abi=soft
|
ARCHCPUFLAGS += -mfloat-abi=soft
|
||||||
|
|||||||
@@ -25,7 +25,12 @@ if(CONFIG_ARCH_CORTEXR52)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_ARCH_FPU)
|
if(CONFIG_ARCH_FPU)
|
||||||
list(APPEND PLATFORM_FLAGS -mfpu=vfpv3-d16)
|
|
||||||
|
if(CONFIG_ARCH_CORTEXR52 AND CONFIG_ARM_NEON)
|
||||||
|
list(APPEND PLATFORM_FLAGS -mfpu=neon-fp-armv8)
|
||||||
|
else()
|
||||||
|
list(APPEND PLATFORM_FLAGS -mfpu=fpv5-sp-d16)
|
||||||
|
endif()
|
||||||
if(CONFIG_ARM_FPU_ABI_SOFT)
|
if(CONFIG_ARM_FPU_ABI_SOFT)
|
||||||
list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp)
|
list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp)
|
||||||
else()
|
else()
|
||||||
|
|||||||
Reference in New Issue
Block a user