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