Math library optimatizations for FPU only apply to ARMv8 which is not yet supported.
This commit is contained in:
parent
2f8c2b62e1
commit
9cc37d8ee1
@ -302,6 +302,10 @@ config ARCH_CORTEXM0
|
||||
select ARCH_HAVE_IRQPRIO
|
||||
select ARCH_HAVE_RESET
|
||||
|
||||
config ARCH_CORTEXM23
|
||||
bool
|
||||
default n
|
||||
|
||||
config ARCH_CORTEXM3
|
||||
bool
|
||||
default n
|
||||
@ -310,6 +314,10 @@ config ARCH_CORTEXM3
|
||||
select ARCH_HAVE_HIPRI_INTERRUPT
|
||||
select ARCH_HAVE_RESET
|
||||
|
||||
config ARCH_CORTEXM33
|
||||
bool
|
||||
default n
|
||||
|
||||
config ARCH_CORTEXM4
|
||||
bool
|
||||
default n
|
||||
|
@ -3,70 +3,58 @@
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
# These are library functions that may be overriden by architecture-
|
||||
# specific implementations. Not all architectures support implementations
|
||||
# for every library function.
|
||||
|
||||
config LIBM_ARCH_CEIL
|
||||
default n
|
||||
depends on LIBC_ARCHOPT
|
||||
depends on LIBM && ARCH_CORTEXM33
|
||||
|
||||
config LIBM_ARCH_FLOOR
|
||||
default n
|
||||
depends on LIBC_ARCHOPT
|
||||
depends on LIBM && ARCH_CORTEXM33
|
||||
|
||||
config LIBM_ARCH_NEARBYINT
|
||||
default n
|
||||
depends on LIBC_ARCHOPT
|
||||
depends on LIBM && ARCH_CORTEXM33
|
||||
|
||||
config LIBM_ARCH_RINT
|
||||
default n
|
||||
depends on LIBC_ARCHOPT
|
||||
depends on LIBM && ARCH_CORTEXM33
|
||||
|
||||
config LIBM_ARCH_ROUND
|
||||
default n
|
||||
depends on LIBC_ARCHOPT
|
||||
depends on LIBM && ARCH_CORTEXM33
|
||||
|
||||
config LIBM_ARCH_TRUNC
|
||||
default n
|
||||
depends on LIBC_ARCHOPT
|
||||
depends on LIBM && ARCH_CORTEXM33
|
||||
|
||||
config LIBM_ARCH_CEILF
|
||||
default n
|
||||
depends on LIBC_ARCHOPT
|
||||
depends on LIBM && ARCH_CORTEXM33
|
||||
|
||||
config LIBM_ARCH_FLOORF
|
||||
default n
|
||||
depends on LIBC_ARCHOPT
|
||||
depends on LIBM && ARCH_CORTEXM33
|
||||
|
||||
config LIBM_ARCH_NEARBYINTF
|
||||
default n
|
||||
depends on LIBC_ARCHOPT
|
||||
depends on LIBM && ARCH_CORTEXM33
|
||||
|
||||
config LIBM_ARCH_RINTF
|
||||
default n
|
||||
depends on LIBC_ARCHOPT
|
||||
depends on LIBM && ARCH_CORTEXM33
|
||||
|
||||
config LIBM_ARCH_ROUNDF
|
||||
default n
|
||||
depends on LIBC_ARCHOPT
|
||||
depends on LIBM && ARCH_CORTEXM33
|
||||
|
||||
config LIBM_ARCH_TRUNCF
|
||||
default n
|
||||
depends on LIBC_ARCHOPT
|
||||
depends on LIBM && ARCH_CORTEXM33
|
||||
|
||||
config LIBC_ARCHOPT
|
||||
bool "Architecture specific optimizations"
|
||||
default n
|
||||
select LIBM_ARCH_CEIL if CONFIG_ARCH_DPFPU
|
||||
select LIBM_ARCH_FLOOR if CONFIG_ARCH_DPFPU
|
||||
select LIBM_ARCH_NEARBYINT if CONFIG_ARCH_DPFPU
|
||||
select LIBM_ARCH_RINT if CONFIG_ARCH_DPFPU
|
||||
select LIBM_ARCH_ROUND if CONFIG_ARCH_DPFPU
|
||||
select LIBM_ARCH_TRUNC if CONFIG_ARCH_DPFPU
|
||||
select LIBM_ARCH_CEILF if CONFIG_ARCH_FPU
|
||||
select LIBM_ARCH_FLOORF if CONFIG_ARCH_FPU
|
||||
select LIBM_ARCH_NEARBYINTF if CONFIG_ARCH_FPU
|
||||
select LIBM_ARCH_RINTF if CONFIG_ARCH_FPU
|
||||
select LIBM_ARCH_ROUNDF if CONFIG_ARCH_FPU
|
||||
select LIBM_ARCH_TRUNCF if CONFIG_ARCH_FPU
|
||||
depends on ARCH_ARM && LIBM
|
||||
---help---
|
||||
Enable architecture specific optimizations. Currently only
|
||||
available for use with ARM and only for the NuttX math library.
|
||||
if ARCH_CORTEXM33
|
||||
source libc/machine/armv8/Kconfig
|
||||
endif
|
||||
|
@ -33,8 +33,6 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
ifeq ($(CONFIG_LIBC_ARCHOPT),y)
|
||||
ifeq ($(CONFIG_ARCH_ARM),y)
|
||||
include ${TOPDIR}/libc/machine/arm/Make.defs
|
||||
endif
|
||||
ifeq ($(CONFIG_ARCH_CORTEXM33),y)
|
||||
include ${TOPDIR}/libc/machine/armv8/Make.defs
|
||||
endif
|
||||
|
27
libc/machine/armv8/Kconfig
Normal file
27
libc/machine/armv8/Kconfig
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
if ARCH_CORTEXM33
|
||||
|
||||
config ARMV8_LIBM
|
||||
bool "Architecture specific optimizations"
|
||||
default n
|
||||
select LIBM_ARCH_CEIL if CONFIG_ARCH_DPFPU
|
||||
select LIBM_ARCH_FLOOR if CONFIG_ARCH_DPFPU
|
||||
select LIBM_ARCH_NEARBYINT if CONFIG_ARCH_DPFPU
|
||||
select LIBM_ARCH_RINT if CONFIG_ARCH_DPFPU
|
||||
select LIBM_ARCH_ROUND if CONFIG_ARCH_DPFPU
|
||||
select LIBM_ARCH_TRUNC if CONFIG_ARCH_DPFPU
|
||||
select LIBM_ARCH_CEILF if CONFIG_ARCH_FPU
|
||||
select LIBM_ARCH_FLOORF if CONFIG_ARCH_FPU
|
||||
select LIBM_ARCH_NEARBYINTF if CONFIG_ARCH_FPU
|
||||
select LIBM_ARCH_RINTF if CONFIG_ARCH_FPU
|
||||
select LIBM_ARCH_ROUNDF if CONFIG_ARCH_FPU
|
||||
select LIBM_ARCH_TRUNCF if CONFIG_ARCH_FPU
|
||||
depends on LIBM
|
||||
---help---
|
||||
Enable ARMv8 specific floating point optimizations.
|
||||
|
||||
endif
|
@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# libc/machine/arm/Make.defs
|
||||
# libc/machine/armv8/Make.defs
|
||||
#
|
||||
# Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@ -33,21 +33,57 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
ifeq ($(CONFIG_LIBM),y)
|
||||
ifeq ($(CONFIG_ARCH_FPU),y)
|
||||
ifeq ($(CONFIG_ARMV8_LIBM),y)
|
||||
|
||||
CSRCS += lib_ceilf.c lib_floorf.c lib_nearbyintf.c lib_rintf.c
|
||||
CSRCS += lib_roundf.c lib_truncf.c
|
||||
ifeq ($(LIBM_ARCH_CEIL),y)
|
||||
CSRCS += arch_ceil.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_DPFPU),y)
|
||||
ifeq ($(LIBM_ARCH_CEILF),y)
|
||||
CSRCS += arch_ceilf.c
|
||||
endif
|
||||
|
||||
CSRCS += lib_ceil.c lib_floor.c lib_nearbyint.c lib_rint.c lib_round.c
|
||||
CSRCS += lib_trunc.c
|
||||
ifeq ($(LIBM_ARCH_FLOOR),y)
|
||||
CSRCS += arch_floor.c
|
||||
endif
|
||||
|
||||
endif # CONFIG_ARCH_DPFPU
|
||||
ifeq ($(LIBM_ARCH_FLOORF),y)
|
||||
CSRCS += arch_floorf.c
|
||||
endif
|
||||
|
||||
DEPPATH += --dep-path machine/arm
|
||||
VPATH += :machine/arm
|
||||
ifeq ($(LIBM_ARCH_NEARBYINT),y)
|
||||
CSRCS += arch_nearbyint.c
|
||||
endif
|
||||
|
||||
endif # CONFIG_ARCH_FPU
|
||||
endif # CONFIG_LIBM
|
||||
ifeq ($(LIBM_ARCH_NEARBYINTF),y)
|
||||
CSRCS += arch_nearbyintf.c
|
||||
endif
|
||||
|
||||
ifeq ($(LIBM_ARCH_RINTF),y)
|
||||
CSRCS += arch_rintf.c
|
||||
endif
|
||||
|
||||
ifeq ($(LIBM_ARCH_ROUNDF),y)
|
||||
CSRCS += arch_roundf.c
|
||||
endif
|
||||
|
||||
ifeq ($(LIBM_ARCH_TRUNCF),y)
|
||||
CSRCS += arch_truncf.c
|
||||
endif
|
||||
|
||||
ifeq ($(LIBM_ARCH_RINT),y)
|
||||
CSRCS += arch_rint.c
|
||||
endif
|
||||
|
||||
ifeq ($(LIBM_ARCH_ROUND),y)
|
||||
CSRCS += arch_round.c
|
||||
endif
|
||||
|
||||
ifeq ($(LIBM_ARCH_TRUNC),y)
|
||||
CSRCS += arch_trunc.c
|
||||
endif
|
||||
|
||||
DEPPATH += --dep-path machine/armv8
|
||||
VPATH += :machine/armv8
|
||||
|
||||
endif # CONFIG_ARMV8_LIBM
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libc/machine/arm/lib_ceil.c
|
||||
* libc/machine/armv8/arch_ceil.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
*
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libc/machine/arm/lib_ceilf.c
|
||||
* libc/machine/armv8/arch_ceilf.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
*
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libc/machine/arm/lib_floor.c
|
||||
* libc/machine/armv8/arch_floor.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
*
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libc/machine/arm/lib_floorf.c
|
||||
* libc/machine/armv8/arch_floorf.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
*
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libc/machine/arm/lib_nearbyint.c
|
||||
* libc/machine/armv8/arch_nearbyint.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
*
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libc/machine/arm/lib_nearbyintf.c
|
||||
* libc/machine/armv8/arch_nearbyintf.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
*
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libc/machine/arm/lib_rint.c
|
||||
* libc/machine/armv8/arch_rint.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
*
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libc/machine/arm/lib_rintf.c
|
||||
* libc/machine/armv8/arch_rintf.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
*
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libc/machine/arm/lib_round.c
|
||||
* libc/machine/armv8/arch_round.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
*
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libc/machine/arm/lib_roundf.c
|
||||
* libc/machine/armv8/arch_roundf.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
*
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libc/machine/arm/lib_trunc.c
|
||||
* libc/machine/armv8/arch_trunc.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
*
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libc/machine/arm/lib_truncf.c
|
||||
* libc/machine/armv8/arch_truncf.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
*
|
Loading…
Reference in New Issue
Block a user