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

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") ||
172 CpuInfo::FieldContains(kCpuInfoArchitecture, "AArch64")) {
171 // pretend that this arm64 cpu is really an ARMv7 173 // pretend that this arm64 cpu is really an ARMv7
172 arm_version_ = ARMv7; 174 arm_version_ = ARMv7;
173 is_arm64 = true; 175 is_arm64 = true;
174 } else if (CpuInfo::FieldContains(kCpuInfoProcessor, "ARM926EJ-S") || 176 } else if (CpuInfo::FieldContains(kCpuInfoProcessor, "ARM926EJ-S") ||
175 CpuInfo::FieldContains(kCpuInfoModel, "ARM926EJ-S")) { 177 CpuInfo::FieldContains(kCpuInfoModel, "ARM926EJ-S")) {
176 // Lego Mindstorm EV3. 178 // Lego Mindstorm EV3.
177 arm_version_ = ARMv5TE; 179 arm_version_ = ARMv5TE;
178 // On ARMv5, the PC read offset in an STR or STM instruction is either 8 or 180 // 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 181 // 12 bytes depending on the implementation. On the Mindstorm EV3 it is 12
180 // bytes. 182 // bytes.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 ASSERT(hardware_ != NULL); 282 ASSERT(hardware_ != NULL);
281 free(const_cast<char*>(hardware_)); 283 free(const_cast<char*>(hardware_));
282 hardware_ = NULL; 284 hardware_ = NULL;
283 CpuInfo::Cleanup(); 285 CpuInfo::Cleanup();
284 } 286 }
285 #endif // !defined(USING_SIMULATOR) 287 #endif // !defined(USING_SIMULATOR)
286 288
287 } // namespace dart 289 } // namespace dart
288 290
289 #endif // defined TARGET_ARCH_ARM 291 #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