1# SPDX-License-Identifier: Apache-2.0 2# Copyright (c) 2022 Lexmark International, Inc. 3 4# ARM architecture VFP configuration options 5 6# Math coprocessor symbols; these should be selected by the CPU symbol to 7# indicate that the CPU core can be configured with the specified 8# coprocessor(s). 9 10config CPU_HAS_VFP 11 bool 12 select CPU_HAS_FPU 13 imply FPU 14 imply FPU_SHARING 15 help 16 This option signifies the support for a Vectored Floating-Point (VFP) 17 coprocessor. 18 19config CPU_HAS_NEON 20 bool 21 select CPU_HAS_FPU 22 help 23 This option signifies the support for a NEON (Advanced SIMD) coprocessor. 24 25# VFP type symbols; these should be selected by the SoC symbol to specify the 26# type of the VFP core instantiated by the SoC. 27 28config VFP_SP_D16 29 bool 30 select CPU_HAS_VFP 31 select VFP_FEATURE_SINGLE_PRECISION 32 select VFP_FEATURE_REGS_S32_D16 33 help 34 This option signifies the use of a VFP floating-point coprocessor 35 that supports only single-precision operations with 16 double-word 36 registers. 37 38config VFP_SP_D16_FP16 39 bool 40 select CPU_HAS_VFP 41 select VFP_FEATURE_HALF_PRECISION 42 select VFP_FEATURE_SINGLE_PRECISION 43 select VFP_FEATURE_REGS_S32_D16 44 help 45 This option signifies the use of a VFP floating-point coprocessor 46 that supports half- and single-precision operations with 16 47 double-word registers. 48 49config VFP_SP_D16_FP16_FMAC 50 bool 51 select CPU_HAS_VFP 52 select VFP_FEATURE_HALF_PRECISION 53 select VFP_FEATURE_SINGLE_PRECISION 54 select VFP_FEATURE_FMAC 55 select VFP_FEATURE_REGS_S32_D16 56 help 57 This option signifies the use of a VFP floating-point coprocessor 58 that supports half- and single-precision operations (including fused 59 multiply-accumulate) with 16 double-word registers. 60 61config VFP_DP_D16 62 bool 63 select CPU_HAS_VFP 64 select VFP_FEATURE_SINGLE_PRECISION 65 select VFP_FEATURE_DOUBLE_PRECISION 66 select VFP_FEATURE_REGS_S32_D16 67 help 68 This option signifies the use of a VFP floating-point coprocessor 69 that supports single- and double-precision operations with 16 70 double-word registers. 71 72config VFP_DP_D16_FP16 73 bool 74 select CPU_HAS_VFP 75 select VFP_FEATURE_HALF_PRECISION 76 select VFP_FEATURE_SINGLE_PRECISION 77 select VFP_FEATURE_DOUBLE_PRECISION 78 select VFP_FEATURE_REGS_S32_D16 79 help 80 This option signifies the use of a VFP floating-point coprocessor 81 that supports half-, single- and double-precision operations with 16 82 double-word registers. 83 84config VFP_DP_D16_FP16_FMAC 85 bool 86 select CPU_HAS_VFP 87 select VFP_FEATURE_HALF_PRECISION 88 select VFP_FEATURE_SINGLE_PRECISION 89 select VFP_FEATURE_DOUBLE_PRECISION 90 select VFP_FEATURE_FMAC 91 select VFP_FEATURE_REGS_S32_D16 92 help 93 This option signifies the use of a VFP floating-point coprocessor 94 that supports half-, single- and double-precision operations 95 (including fused multiply-accumulate) with 16 double-word registers. 96 97config VFP_U_DP_D16_FP16_FMAC 98 bool 99 select CPU_HAS_VFP 100 select VFP_FEATURE_HALF_PRECISION 101 select VFP_FEATURE_SINGLE_PRECISION 102 select VFP_FEATURE_DOUBLE_PRECISION 103 select VFP_FEATURE_FMAC 104 select VFP_FEATURE_REGS_S32_D16 105 select VFP_FEATURE_TRAP 106 help 107 This option signifies the use of a VFP floating-point coprocessor 108 that supports half-, single-, double-precision operations (including 109 fused multiply-accumulate) and floating-point exception trapping with 16 110 double-word registers. 111 112config VFP_DP_D32_FP16_FMAC 113 bool 114 select CPU_HAS_VFP 115 select VFP_FEATURE_HALF_PRECISION 116 select VFP_FEATURE_SINGLE_PRECISION 117 select VFP_FEATURE_DOUBLE_PRECISION 118 select VFP_FEATURE_FMAC 119 select VFP_FEATURE_REGS_S64_D32 120 help 121 This option signifies the use of a VFP floating-point coprocessor 122 that supports half-, single- and double-precision operations 123 (including fused multiply-accumulate) with 32 double-word registers. 124 125config VFP_U_DP_D32_FP16_FMAC 126 bool 127 select CPU_HAS_VFP 128 select VFP_FEATURE_HALF_PRECISION 129 select VFP_FEATURE_SINGLE_PRECISION 130 select VFP_FEATURE_DOUBLE_PRECISION 131 select VFP_FEATURE_FMAC 132 select VFP_FEATURE_REGS_S64_D32 133 select VFP_FEATURE_TRAP 134 help 135 This option signifies the use of a VFP floating-point coprocessor 136 that supports half-, single-, double-precision operations (including 137 fused multiply-accumulate) and floating-point exception trapping with 32 138 double-word registers. 139 140if CPU_HAS_VFP 141 142# VFP feature symbols; these are the helper symbols used by the floating-point 143# support code to resolve the supported VFP features. 144 145config VFP_FEATURE_HALF_PRECISION 146 bool 147 help 148 This option signifies that the VFP coprocessor supports 149 half-precision operations (half-precision extension). 150 151config VFP_FEATURE_SINGLE_PRECISION 152 bool 153 help 154 This option signifies that the VFP coprocessor supports 155 single-precision operations. 156 157config VFP_FEATURE_DOUBLE_PRECISION 158 bool 159 select CPU_HAS_FPU_DOUBLE_PRECISION 160 help 161 This option signifies that the VFP coprocessor supports 162 double-precision operations. 163 164config VFP_FEATURE_VECTOR 165 bool 166 help 167 This option signifies that the VFP coprocessor supports vector 168 operations. 169 170config VFP_FEATURE_FMAC 171 bool 172 help 173 This option signifies that the VFP coprocessor supports the fused 174 multiply-accumulate operations. 175 176config VFP_FEATURE_REGS_S32_D16 177 bool 178 help 179 This option signifies that the VFP coprocessor implements 16 180 double-precision (32 single-precision) floating-point registers. 181 182config VFP_FEATURE_REGS_S64_D32 183 bool 184 help 185 This option signifies that the VFP coprocessor implements 32 186 double-precision (64 single-precision) floating-point registers. 187 188config VFP_FEATURE_TRAP 189 bool 190 help 191 This option signifies that the VFP coprocessor supports the trapping 192 of floating-point exceptions to allow software implementation of 193 the unsupported VFP instructions. 194 195endif # CPU_HAS_VFP 196 197# Advanced SIMD type symbols; these should be selected by the SoC symbol to 198# specify the type of the VFP core instantiated by the SoC. 199 200config NEON 201 bool 202 select CPU_HAS_NEON 203 help 204 This option signifies the use of a NEON Advanced SIMD coprocessor. 205