| 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 if (cpu_arch == "arm") { | 5 if (cpu_arch == "arm") { |
| 6 declare_args() { | 6 declare_args() { |
| 7 # Version of the ARM processor when compiling on ARM. Ignored on non-ARM | 7 # Version of the ARM processor when compiling on ARM. Ignored on non-ARM |
| 8 # platforms. | 8 # platforms. |
| 9 arm_version = 7 | 9 arm_version = 7 |
| 10 | 10 |
| 11 # 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 |
| 12 # "softfp". An empty string means to use the default one for the | 12 # "softfp". An empty string means to use the default one for the |
| 13 # arm_version. | 13 # arm_version. |
| 14 arm_float_abi = "" | 14 arm_float_abi = "" |
| 15 | 15 |
| 16 # The ARM variant-specific tuning mode. This will be a string like "armv6" | 16 # The ARM variant-specific tuning mode. This will be a string like "armv6" |
| 17 # or "cortex-a15". An empty string means to use the default for the | 17 # or "cortex-a15". An empty string means to use the default for the |
| 18 # arm_version. | 18 # arm_version. |
| 19 arm_tune = "" | 19 arm_tune = "" |
| 20 | 20 |
| 21 # Whether to use the neon FPU instruction set or not. | 21 # Whether to use the neon FPU instruction set or not. |
| 22 arm_use_neon = true | 22 arm_use_neon = true |
| 23 } | 23 } |
| 24 | 24 |
| 25 assert(arm_float_abi == "" || | 25 assert(arm_float_abi == "" || arm_float_abi == "hard" || |
| 26 arm_float_abi == "hard" || | 26 arm_float_abi == "soft" || arm_float_abi == "softfp") |
| 27 arm_float_abi == "soft" || | |
| 28 arm_float_abi == "softfp") | |
| 29 | 27 |
| 30 if (is_android) { | 28 if (is_android) { |
| 31 arm_use_neon = false | 29 arm_use_neon = false |
| 32 } | 30 } |
| 33 arm_optionally_use_neon = true | 31 arm_optionally_use_neon = true |
| 34 | 32 |
| 35 if (arm_version == 6) { | 33 if (arm_version == 6) { |
| 36 arm_arch = "armv6" | 34 arm_arch = "armv6" |
| 37 if (arm_tune != "") { | 35 if (arm_tune != "") { |
| 38 arm_tune = "" | 36 arm_tune = "" |
| 39 } | 37 } |
| 40 if (arm_float_abi == "") { | 38 if (arm_float_abi == "") { |
| 41 arm_float_abi = "softfp" | 39 arm_float_abi = "softfp" |
| 42 } | 40 } |
| 43 arm_fpu = "vfp" | 41 arm_fpu = "vfp" |
| 42 |
| 44 # Thumb is a reduced instruction set available on some ARM processors that | 43 # Thumb is a reduced instruction set available on some ARM processors that |
| 45 # has increased code density. | 44 # has increased code density. |
| 46 arm_use_thumb = false | 45 arm_use_thumb = false |
| 47 | |
| 48 } else if (arm_version == 7) { | 46 } else if (arm_version == 7) { |
| 49 arm_arch = "armv7-a" | 47 arm_arch = "armv7-a" |
| 50 if (arm_tune == "") { | 48 if (arm_tune == "") { |
| 51 arm_tune = "generic-armv7-a" | 49 arm_tune = "generic-armv7-a" |
| 52 } | 50 } |
| 53 | 51 |
| 54 if (arm_float_abi == "") { | 52 if (arm_float_abi == "") { |
| 55 arm_float_abi = "softfp" | 53 arm_float_abi = "softfp" |
| 56 } | 54 } |
| 57 | 55 |
| 58 arm_use_thumb = true | 56 arm_use_thumb = true |
| 59 | 57 |
| 60 if (arm_use_neon) { | 58 if (arm_use_neon) { |
| 61 arm_fpu = "neon" | 59 arm_fpu = "neon" |
| 62 } else { | 60 } else { |
| 63 arm_fpu = "vfpv3-d16" | 61 arm_fpu = "vfpv3-d16" |
| 64 } | 62 } |
| 65 } | 63 } |
| 66 } | 64 } |
| OLD | NEW |