From e9b2ffc0feeefdd03115f1e9495e9be48ee749b2 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Mon, 19 Oct 2015 19:59:21 +0200 Subject: feature-arm-{neon,vfp}.inc: refactor and fix issues * respect all 4 vfp options ('vfp', 'vfpv3d16', 'vfpv3', 'vfpv4') when setting -mfloat-abi and ARMPKGSFX_EABI, without this change it wasn't possible to use call-convention hard together with vfpv4 * move 'vfpv3d16', 'vfpv3', 'vfpv4' support from feature-arm-vfp.inc to feature-arm-neon.inc the main difference is that feature-arm-vfp.inc is included in arch-armv5.inc while feature-arm-neon.inc only in armv7*.inc, so these options should be added to TUNEVALID also only for armv7* MACHINEs. * support vfpv4 with or without neon when both vfpv4 and neon are in TUNE_FEATURES we want to set only one -mfpu parameter and to neon-vfpv4 * prevent multiple appends to ARMPKGSFX_FPU, we don't want to include e.g. -vfp as well as -vfpv4 when both "vfp" and "vfpv4" are in TUNE_FEATURES * add -mfpu=vfp for tunes with "vfp" in TUNE_FEATURES - before that we were only adding -vfp to ARMPKGSFX_FPU * add TUNE_CCARGS_MFPU variable which is used to set -mfpu parameter as well as ARMPKGSFX_FPU suffix in TUNE_PKGARCH, all enabled values are appended to it based on TUNE_FEATURES and then the last one is used in the actual param and suffix * this prevents multiple -mfpu options in TUNE_CCARGS * !!! This means we need to change TUNE_PKGARCH and PACKAGE_EXTRA_ARCHS for vfpv4, vfpv3d16, vfpv3 tunes, because the -vfp* isn't prependend multiple times. If you're using one of these new DEFAULTTUNES (which were at least partially broken anyway) and depend on working binary package feed upgrade-path, then don't forget to migrate PR service database to new TUNE_PKGARCH. (From OE-Core rev: 6661718158f8fdcdf63b0d48e8fe72d3ac4778f2) Signed-off-by: Martin Jansa Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/conf/machine/include/arm/feature-arm-neon.inc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'meta/conf/machine/include/arm/feature-arm-neon.inc') diff --git a/meta/conf/machine/include/arm/feature-arm-neon.inc b/meta/conf/machine/include/arm/feature-arm-neon.inc index e9351f9dd1..50d917522c 100644 --- a/meta/conf/machine/include/arm/feature-arm-neon.inc +++ b/meta/conf/machine/include/arm/feature-arm-neon.inc @@ -1,3 +1,18 @@ +# GCC supports following options: +# 'vfp', 'vfpv3', 'vfpv3-fp16', 'vfpv3-d16', 'vfpv3-d16-fp16', 'vfpv3xd', 'vfpv3xd-fp16', 'neon', 'neon-fp16', 'vfpv4', 'vfpv4-d16', 'fpv4-sp-d16', 'neon-vfpv4', 'fpv5-d16', 'fpv5-sp-d16', 'fp-armv8', 'neon-fp-armv8', and 'crypto-neon-fp-armv8' + +# Only some combinations are supported here. +# 'vfp', -mfloat-abi parameter and 'hf' suffix is implemented in feature-arm-vfp.inc + TUNEVALID[neon] = "Enable Neon SIMD accelerator unit." -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'neon', bb.utils.contains('TUNE_FEATURES', 'vfpv4', ' -mfpu=neon-vfpv4', ' -mfpu=neon', d), '' , d)}" -ARMPKGSFX_FPU .= "${@bb.utils.contains('TUNE_FEATURES', 'neon', '-neon', '', d)}" +TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'neon', ' neon', '', d)}" + +TUNEVALID[vfpv3d16] = "Enable Vector Floating Point Version 3 with 16 registers (vfpv3-d16) unit." +TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', ' vfpv3d16', '', d)}" + +TUNEVALID[vfpv3] = "Enable Vector Floating Point Version 3 with 32 registers (vfpv3) unit." +TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3', ' vfpv3', '' , d)}" + +TUNEVALID[vfpv4] = "Enable Vector Floating Point Version 4 (vfpv4) unit." +TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv4', ' vfpv4', '', d)}" +TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', [ 'vfpv4', 'neon' ], ' neon-vfpv4', '', d)}" -- cgit v1.2.3-54-g00ecf