1 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 if (cpu_arch == "arm") { 6 declare_args() { 7 # Version of the ARM processor when compiling on ARM. Ignored on non-ARM 8 # platforms. 9 arm_version = 7 10 11 # The ARM floating point mode. This is either the string "hard", "soft", or 12 # "softfp". An empty string means to use the default one for the 13 # arm_version. 14 arm_float_abi = "" 15 } 16 17 assert(arm_float_abi == "" || 18 arm_float_abi == "hard" || 19 arm_float_abi == "soft" || 20 arm_float_abi == "softfp") 21 22 if (is_android) { 23 arm_use_neon = false 24 arm_optionally_use_neon = false 25 } else { 26 arm_use_neon = true 27 arm_optionally_use_neon = true 28 } 29 30 if (arm_version == 6) { 31 arm_arch = "armv6" 32 arm_tune = "" 33 if (arm_float_abi == "") { 34 arm_float_abi = "softfp" 35 } 36 arm_fpu = "vfp" 37 # Thumb is a reduced instruction set available on some ARM processors that 38 # has increased code density. 39 arm_use_thumb = false 40 41 } else if (arm_version == 7) { 42 arm_arch = "armv7-a" 43 arm_tune = "generic-armv7-a" 44 if (arm_float_abi == "") { 45 arm_float_abi = "softfp" 46 } 47 arm_use_thumb = true 48 49 if (arm_use_neon) { 50 arm_fpu = "neon" 51 } else { 52 arm_fpu = "vfpv3-d16" 53 } 54 } 55 } 56