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 # These are primarily relevant in current_cpu == "arm" contexts, where | 5 # These are primarily relevant in current_cpu == "arm" contexts, where |
6 # ARM code is being compiled. But they can also be relevant in the | 6 # ARM code is being compiled. But they can also be relevant in the |
7 # host toolchain context when target_cpu == "arm", where a host-side | 7 # host toolchain context when target_cpu == "arm", where a host-side |
8 # build tool being built will change its behavior depending on the | 8 # build tool being built will change its behavior depending on the |
9 # details of the target configuration. | 9 # details of the target configuration. |
10 if (target_cpu == "arm" || current_cpu == "arm") { | 10 if (target_cpu == "arm" || current_cpu == "arm") { |
(...skipping 10 matching lines...) Expand all Loading... |
21 # The ARM variant-specific tuning mode. This will be a string like "armv6" | 21 # The ARM variant-specific tuning mode. This will be a string like "armv6" |
22 # or "cortex-a15". An empty string means to use the default for the | 22 # or "cortex-a15". An empty string means to use the default for the |
23 # arm_version. | 23 # arm_version. |
24 arm_tune = "" | 24 arm_tune = "" |
25 | 25 |
26 # Whether to use the neon FPU instruction set or not. | 26 # Whether to use the neon FPU instruction set or not. |
27 arm_use_neon = true | 27 arm_use_neon = true |
28 | 28 |
29 # Whether to enable optional NEON code paths. | 29 # Whether to enable optional NEON code paths. |
30 arm_optionally_use_neon = false | 30 arm_optionally_use_neon = false |
| 31 |
| 32 # Thumb is a reduced instruction set available on some ARM processors that |
| 33 # has increased code density. |
| 34 arm_use_thumb = true |
31 } | 35 } |
32 | 36 |
33 assert(arm_float_abi == "" || arm_float_abi == "hard" || | 37 assert(arm_float_abi == "" || arm_float_abi == "hard" || |
34 arm_float_abi == "soft" || arm_float_abi == "softfp") | 38 arm_float_abi == "soft" || arm_float_abi == "softfp") |
35 | 39 |
36 if (arm_version == 6) { | 40 if (arm_version == 6) { |
37 arm_arch = "armv6" | 41 arm_arch = "armv6" |
38 if (arm_tune != "") { | 42 if (arm_tune != "") { |
39 arm_tune = "" | 43 arm_tune = "" |
40 } | 44 } |
41 if (arm_float_abi == "") { | 45 if (arm_float_abi == "") { |
42 arm_float_abi = "softfp" | 46 arm_float_abi = "softfp" |
43 } | 47 } |
44 arm_fpu = "vfp" | 48 arm_fpu = "vfp" |
45 | |
46 # Thumb is a reduced instruction set available on some ARM processors that | |
47 # has increased code density. | |
48 arm_use_thumb = false | 49 arm_use_thumb = false |
49 } else if (arm_version == 7) { | 50 } else if (arm_version == 7) { |
50 arm_arch = "armv7-a" | 51 arm_arch = "armv7-a" |
51 if (arm_tune == "") { | 52 if (arm_tune == "") { |
52 arm_tune = "generic-armv7-a" | 53 arm_tune = "generic-armv7-a" |
53 } | 54 } |
54 | 55 |
55 if (arm_float_abi == "") { | 56 if (arm_float_abi == "") { |
56 if (current_os == "android" || target_os == "android") { | 57 if (current_os == "android" || target_os == "android") { |
57 arm_float_abi = "softfp" | 58 arm_float_abi = "softfp" |
58 } else { | 59 } else { |
59 arm_float_abi = "hard" | 60 arm_float_abi = "hard" |
60 } | 61 } |
61 } | 62 } |
62 | 63 |
63 arm_use_thumb = true | |
64 | |
65 if (arm_use_neon) { | 64 if (arm_use_neon) { |
66 arm_fpu = "neon" | 65 arm_fpu = "neon" |
67 } else { | 66 } else { |
68 arm_fpu = "vfpv3-d16" | 67 arm_fpu = "vfpv3-d16" |
69 } | 68 } |
70 } else if (arm_version == 8) { | 69 } else if (arm_version == 8) { |
71 arm_arch = "armv8-a" | 70 arm_arch = "armv8-a" |
72 if (arm_tune == "") { | 71 if (arm_tune == "") { |
73 arm_tune = "generic-armv8-a" | 72 arm_tune = "generic-armv8-a" |
74 } | 73 } |
75 | 74 |
76 if (arm_float_abi == "") { | 75 if (arm_float_abi == "") { |
77 if (current_os == "android" || target_os == "android") { | 76 if (current_os == "android" || target_os == "android") { |
78 arm_float_abi = "softfp" | 77 arm_float_abi = "softfp" |
79 } else { | 78 } else { |
80 arm_float_abi = "hard" | 79 arm_float_abi = "hard" |
81 } | 80 } |
82 } | 81 } |
83 | 82 |
84 arm_use_thumb = true | |
85 | |
86 if (arm_use_neon) { | 83 if (arm_use_neon) { |
87 arm_fpu = "neon" | 84 arm_fpu = "neon" |
88 } else { | 85 } else { |
89 arm_fpu = "vfpv3-d16" | 86 arm_fpu = "vfpv3-d16" |
90 } | 87 } |
91 } | 88 } |
92 } else if (current_cpu == "arm64" || target_cpu == "arm64") { | 89 } else if (current_cpu == "arm64" || target_cpu == "arm64") { |
93 # arm64 supports only "hard". | 90 # arm64 supports only "hard". |
94 arm_float_abi = "hard" | 91 arm_float_abi = "hard" |
95 } | 92 } |
OLD | NEW |