1eb8dc403SDave Cobbley# This is only for VFPv1 or VFPv2, other vfp* tunes are defined in
2eb8dc403SDave Cobbley# feature-arm-neon.inc, because they are available only for armv7*
3eb8dc403SDave Cobbley# and this .inc file is included from armv5
4eb8dc403SDave Cobbley
5eb8dc403SDave CobbleyTUNEVALID[vfp] = "Enable Vector Floating Point (vfp) unit."
6eb8dc403SDave CobbleyTUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfp', ' vfp', '', d)}"
7eb8dc403SDave Cobbley
8*73bd93f1SPatrick Williams# simd is special, we don't pass this to the -mfpu, it's implied
9eb8dc403SDave CobbleyTUNE_CCARGS  .= "${@ (' -mfpu=%s' % d.getVar('TUNE_CCARGS_MFPU').split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU') != '') else ''}"
1019323693SBrad Bishop# The following deals with both vfpv3-d16 and vfpv4-d16
1119323693SBrad BishopARMPKGSFX_FPU = "${@ ('-%s'       % d.getVar('TUNE_CCARGS_MFPU').split()[-1].replace('-d16', 'd16')) if (d.getVar('TUNE_CCARGS_MFPU') != '') else ''}"
12eb8dc403SDave Cobbley
13eb8dc403SDave CobbleyTUNEVALID[callconvention-hard] = "Enable EABI hard float call convention, requires VFP."
14*73bd93f1SPatrick WilliamsTUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU') != '' or bb.utils.contains('TUNE_FEATURES', 'simd', True, False, d)) else '' }"
15eb8dc403SDave CobbleyTUNE_CCARGS   .= "${@ ' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '')     else ''}"
16eb8dc403SDave CobbleyARMPKGSFX_EABI = "${@ 'hf'                                 if (d.getVar('TUNE_CCARGS_MFLOAT') == 'hard') else ''}"
17