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

Side by Side Diff: src/arm64/cpu-arm64.h

Issue 277913002: Presubmit checks recover. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebasing 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 | « src/arm64/constants-arm64.h ('k') | src/arm64/cpu-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project 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 #ifndef V8_ARM64_CPU_ARM64_H_ 5 #ifndef V8_ARM64_CPU_ARM64_H_
6 #define V8_ARM64_CPU_ARM64_H_ 6 #define V8_ARM64_CPU_ARM64_H_
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include "serialize.h" 9 #include "serialize.h"
10 #include "cpu.h" 10 #include "cpu.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 14
15 15
16 // CpuFeatures keeps track of which features are supported by the target CPU. 16 // CpuFeatures keeps track of which features are supported by the target CPU.
17 // Supported features must be enabled by a CpuFeatureScope before use. 17 // Supported features must be enabled by a CpuFeatureScope before use.
18 class CpuFeatures : public AllStatic { 18 class CpuFeatures : public AllStatic {
19 public: 19 public:
20 // Detect features of the target CPU. Set safe defaults if the serializer 20 // Detect features of the target CPU. Set safe defaults if the serializer
21 // is enabled (snapshots must be portable). 21 // is enabled (snapshots must be portable).
22 static void Probe(bool serializer_enabled); 22 static void Probe(bool serializer_enabled);
23 23
24 // Check whether a feature is supported by the target CPU. 24 // Check whether a feature is supported by the target CPU.
25 static bool IsSupported(CpuFeature f) { 25 static bool IsSupported(CpuFeature f) {
26 ASSERT(initialized_); 26 ASSERT(initialized_);
27 return Check(f, supported_); 27 return Check(f, supported_);
28 }; 28 }
29 29
30 static bool IsSafeForSnapshot(Isolate* isolate, CpuFeature f) { 30 static bool IsSafeForSnapshot(Isolate* isolate, CpuFeature f) {
31 return IsSupported(f); 31 return IsSupported(f);
32 } 32 }
33 33
34 // I and D cache line size in bytes. 34 // I and D cache line size in bytes.
35 static unsigned dcache_line_size(); 35 static unsigned dcache_line_size();
36 static unsigned icache_line_size(); 36 static unsigned icache_line_size();
37 37
38 static unsigned supported_; 38 static unsigned supported_;
(...skipping 26 matching lines...) Expand all
65 return 1u << f; 65 return 1u << f;
66 } 66 }
67 67
68 friend class PlatformFeatureScope; 68 friend class PlatformFeatureScope;
69 DISALLOW_COPY_AND_ASSIGN(CpuFeatures); 69 DISALLOW_COPY_AND_ASSIGN(CpuFeatures);
70 }; 70 };
71 71
72 } } // namespace v8::internal 72 } } // namespace v8::internal
73 73
74 #endif // V8_ARM64_CPU_ARM64_H_ 74 #endif // V8_ARM64_CPU_ARM64_H_
OLDNEW
« no previous file with comments | « src/arm64/constants-arm64.h ('k') | src/arm64/cpu-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698