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

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

Issue 303443010: Prepares for arm64 cross-build. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/cpu_arm64.cc ('k') | runtime/vm/os_linux.cc » ('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_OS_LINUX) 6 #if defined(TARGET_OS_LINUX)
7 7
8 #include "vm/cpuinfo.h" 8 #include "vm/cpuinfo.h"
9 #include "vm/cpuid.h" 9 #include "vm/cpuid.h"
10 #include "vm/proccpuinfo.h" 10 #include "vm/proccpuinfo.h"
(...skipping 17 matching lines...) Expand all
28 fields_[kCpuInfoFeatures] = "flags"; 28 fields_[kCpuInfoFeatures] = "flags";
29 method_ = kCpuInfoCpuId; 29 method_ = kCpuInfoCpuId;
30 CpuId::InitOnce(); 30 CpuId::InitOnce();
31 #elif defined(HOST_ARCH_ARM) 31 #elif defined(HOST_ARCH_ARM)
32 fields_[kCpuInfoProcessor] = "Processor"; 32 fields_[kCpuInfoProcessor] = "Processor";
33 fields_[kCpuInfoModel] = "model name"; 33 fields_[kCpuInfoModel] = "model name";
34 fields_[kCpuInfoHardware] = "Hardware"; 34 fields_[kCpuInfoHardware] = "Hardware";
35 fields_[kCpuInfoFeatures] = "Features"; 35 fields_[kCpuInfoFeatures] = "Features";
36 method_ = kCpuInfoSystem; 36 method_ = kCpuInfoSystem;
37 ProcCpuInfo::InitOnce(); 37 ProcCpuInfo::InitOnce();
38 #elif defined(HOST_ARCH_MIPS) 38 #elif defined(HOST_ARCH_MIPS) || defined(HOST_ARCH_ARM64)
39 // TODO(zra): Verify that these field names are correct for arm64.
39 fields_[kCpuInfoProcessor] = "system type"; 40 fields_[kCpuInfoProcessor] = "system type";
40 fields_[kCpuInfoModel] = "cpu model"; 41 fields_[kCpuInfoModel] = "cpu model";
41 fields_[kCpuInfoHardware] = "cpu model"; 42 fields_[kCpuInfoHardware] = "cpu model";
42 fields_[kCpuInfoFeatures] = "ASEs implemented"; 43 fields_[kCpuInfoFeatures] = "ASEs implemented";
43 method_ = kCpuInfoSystem; 44 method_ = kCpuInfoSystem;
44 ProcCpuInfo::InitOnce(); 45 ProcCpuInfo::InitOnce();
45 #else 46 #else
46 #error Unrecognized target architecture 47 #error Unrecognized target architecture
47 #endif 48 #endif
48 } 49 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 (strcmp(field, fields_[kCpuInfoFeatures]) == 0); 120 (strcmp(field, fields_[kCpuInfoFeatures]) == 0);
120 } else { 121 } else {
121 ASSERT(method_ == kCpuInfoSystem); 122 ASSERT(method_ == kCpuInfoSystem);
122 return ProcCpuInfo::HasField(field); 123 return ProcCpuInfo::HasField(field);
123 } 124 }
124 } 125 }
125 126
126 } // namespace dart 127 } // namespace dart
127 128
128 #endif // defined(TARGET_OS_LINUX) 129 #endif // defined(TARGET_OS_LINUX)
OLDNEW
« no previous file with comments | « runtime/vm/cpu_arm64.cc ('k') | runtime/vm/os_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698