| 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 import("//build/config/v8_target_cpu.gni") | 5 import("//build/config/v8_target_cpu.gni") |
| 6 | 6 |
| 7 # These are primarily relevant in current_cpu == "arm" contexts, where | 7 # These are primarily relevant in current_cpu == "arm" contexts, where |
| 8 # ARM code is being compiled. But they can also be relevant in the | 8 # ARM code is being compiled. But they can also be relevant in the |
| 9 # other contexts when the code will change its behavior based on the | 9 # other contexts when the code will change its behavior based on the |
| 10 # cpu it wants to generate code for. | 10 # cpu it wants to generate code for. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 # Thumb is a reduced instruction set available on some ARM processors that | 33 # Thumb is a reduced instruction set available on some ARM processors that |
| 34 # has increased code density. | 34 # has increased code density. |
| 35 arm_use_thumb = true | 35 arm_use_thumb = true |
| 36 } | 36 } |
| 37 | 37 |
| 38 assert(arm_float_abi == "" || arm_float_abi == "hard" || | 38 assert(arm_float_abi == "" || arm_float_abi == "hard" || |
| 39 arm_float_abi == "soft" || arm_float_abi == "softfp") | 39 arm_float_abi == "soft" || arm_float_abi == "softfp") |
| 40 | 40 |
| 41 if (arm_use_neon == "") { | 41 if (arm_use_neon == "") { |
| 42 if (current_os == "linux" && current_cpu != v8_current_cpu) { | 42 if (current_os == "linux" && target_cpu != v8_target_cpu) { |
| 43 # Don't use neon on V8 simulator builds as a default. | 43 # Don't use neon on V8 simulator builds as a default. |
| 44 arm_use_neon = false | 44 arm_use_neon = false |
| 45 } else { | 45 } else { |
| 46 arm_use_neon = true | 46 arm_use_neon = true |
| 47 } | 47 } |
| 48 } | 48 } |
| 49 | 49 |
| 50 if (arm_version == 6) { | 50 if (arm_version == 6) { |
| 51 arm_arch = "armv6" | 51 arm_arch = "armv6" |
| 52 if (arm_tune != "") { | 52 if (arm_tune != "") { |
| 53 arm_tune = "" | 53 arm_tune = "" |
| 54 } | 54 } |
| 55 if (arm_float_abi == "") { | 55 if (arm_float_abi == "") { |
| 56 arm_float_abi = "softfp" | 56 arm_float_abi = "softfp" |
| 57 } | 57 } |
| 58 arm_fpu = "vfp" | 58 arm_fpu = "vfp" |
| 59 arm_use_thumb = false | 59 arm_use_thumb = false |
| 60 } else if (arm_version == 7) { | 60 } else if (arm_version == 7) { |
| 61 arm_arch = "armv7-a" | 61 arm_arch = "armv7-a" |
| 62 if (arm_tune == "") { | 62 if (arm_tune == "") { |
| 63 arm_tune = "generic-armv7-a" | 63 arm_tune = "generic-armv7-a" |
| 64 } | 64 } |
| 65 | 65 |
| 66 if (arm_float_abi == "") { | 66 if (arm_float_abi == "") { |
| 67 if (current_os == "android" || target_os == "android") { | 67 if (current_os == "android" || target_os == "android") { |
| 68 arm_float_abi = "softfp" | 68 arm_float_abi = "softfp" |
| 69 } else if (current_os == "linux" && current_cpu != v8_current_cpu) { | 69 } else if (current_os == "linux" && target_cpu != v8_target_cpu) { |
| 70 # Default to the same as Android for V8 simulator builds. | 70 # Default to the same as Android for V8 simulator builds. |
| 71 arm_float_abi = "softfp" | 71 arm_float_abi = "softfp" |
| 72 } else { | 72 } else { |
| 73 arm_float_abi = "hard" | 73 arm_float_abi = "hard" |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 if (arm_use_neon) { | 77 if (arm_use_neon) { |
| 78 arm_fpu = "neon" | 78 arm_fpu = "neon" |
| 79 } else { | 79 } else { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 97 arm_fpu = "neon" | 97 arm_fpu = "neon" |
| 98 } else { | 98 } else { |
| 99 arm_fpu = "vfpv3-d16" | 99 arm_fpu = "vfpv3-d16" |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 } else if (current_cpu == "arm64" || v8_current_cpu == "arm64") { | 102 } else if (current_cpu == "arm64" || v8_current_cpu == "arm64") { |
| 103 # arm64 supports only "hard". | 103 # arm64 supports only "hard". |
| 104 arm_float_abi = "hard" | 104 arm_float_abi = "hard" |
| 105 arm_use_neon = true | 105 arm_use_neon = true |
| 106 } | 106 } |
| OLD | NEW |