Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1310)

Side by Side Diff: runtime/vm/cpu_arm.cc

Issue 2497273003: Make arm32 cpu detection recognize the DragonBoard as arm64. (Closed)
Patch Set: . Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/cpuinfo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/cpu_arm.h" 9 #include "vm/cpu_arm.h"
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 #else // TARGET_OS_IOS 161 #else // TARGET_OS_IOS
162 void HostCPUFeatures::InitOnce() { 162 void HostCPUFeatures::InitOnce() {
163 bool is_arm64 = false; 163 bool is_arm64 = false;
164 CpuInfo::InitOnce(); 164 CpuInfo::InitOnce();
165 hardware_ = CpuInfo::GetCpuModel(); 165 hardware_ = CpuInfo::GetCpuModel();
166 166
167 // Check for ARMv5TE, ARMv6, ARMv7, or aarch64. 167 // Check for ARMv5TE, ARMv6, ARMv7, or aarch64.
168 // It can be in either the Processor or Model information fields. 168 // It can be in either the Processor or Model information fields.
169 if (CpuInfo::FieldContains(kCpuInfoProcessor, "aarch64") || 169 if (CpuInfo::FieldContains(kCpuInfoProcessor, "aarch64") ||
170 CpuInfo::FieldContains(kCpuInfoModel, "aarch64")) { 170 CpuInfo::FieldContains(kCpuInfoModel, "aarch64") ||
171 CpuInfo::FieldContains(kCpuInfoArchitecture, "8")) {
zra 2016/11/14 23:57:08 Also check if this is AArch64 as reported by Andro
rmacnak 2016/11/15 00:46:27 Done.
171 // pretend that this arm64 cpu is really an ARMv7 172 // pretend that this arm64 cpu is really an ARMv7
172 arm_version_ = ARMv7; 173 arm_version_ = ARMv7;
173 is_arm64 = true; 174 is_arm64 = true;
174 } else if (CpuInfo::FieldContains(kCpuInfoProcessor, "ARM926EJ-S") || 175 } else if (CpuInfo::FieldContains(kCpuInfoProcessor, "ARM926EJ-S") ||
175 CpuInfo::FieldContains(kCpuInfoModel, "ARM926EJ-S")) { 176 CpuInfo::FieldContains(kCpuInfoModel, "ARM926EJ-S")) {
176 // Lego Mindstorm EV3. 177 // Lego Mindstorm EV3.
177 arm_version_ = ARMv5TE; 178 arm_version_ = ARMv5TE;
178 // On ARMv5, the PC read offset in an STR or STM instruction is either 8 or 179 // On ARMv5, the PC read offset in an STR or STM instruction is either 8 or
179 // 12 bytes depending on the implementation. On the Mindstorm EV3 it is 12 180 // 12 bytes depending on the implementation. On the Mindstorm EV3 it is 12
180 // bytes. 181 // bytes.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 ASSERT(hardware_ != NULL); 281 ASSERT(hardware_ != NULL);
281 free(const_cast<char*>(hardware_)); 282 free(const_cast<char*>(hardware_));
282 hardware_ = NULL; 283 hardware_ = NULL;
283 CpuInfo::Cleanup(); 284 CpuInfo::Cleanup();
284 } 285 }
285 #endif // !defined(USING_SIMULATOR) 286 #endif // !defined(USING_SIMULATOR)
286 287
287 } // namespace dart 288 } // namespace dart
288 289
289 #endif // defined TARGET_ARCH_ARM 290 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/cpuinfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698