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