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

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

Issue 258993002: Simplified CPU/CpuFeatures a bit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 24 matching lines...) Expand all
35 namespace v8 { 35 namespace v8 {
36 namespace internal { 36 namespace internal {
37 37
38 38
39 // CpuFeatures keeps track of which features are supported by the target CPU. 39 // CpuFeatures keeps track of which features are supported by the target CPU.
40 // Supported features must be enabled by a CpuFeatureScope before use. 40 // Supported features must be enabled by a CpuFeatureScope before use.
41 class CpuFeatures : public AllStatic { 41 class CpuFeatures : public AllStatic {
42 public: 42 public:
43 // Detect features of the target CPU. Set safe defaults if the serializer 43 // Detect features of the target CPU. Set safe defaults if the serializer
44 // is enabled (snapshots must be portable). 44 // is enabled (snapshots must be portable).
45 static void Probe(); 45 static void Probe(bool serializer_enabled);
46 46
47 // Check whether a feature is supported by the target CPU. 47 // Check whether a feature is supported by the target CPU.
48 static bool IsSupported(CpuFeature f) { 48 static bool IsSupported(CpuFeature f) {
49 ASSERT(initialized_); 49 ASSERT(initialized_);
50 // There are no optional features for ARM64. 50 // There are no optional features for ARM64.
51 return false; 51 return false;
52 }; 52 };
53 53
54 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { 54 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) {
55 ASSERT(initialized_); 55 ASSERT(initialized_);
(...skipping 18 matching lines...) Expand all
74 return true; 74 return true;
75 } 75 }
76 76
77 static bool VerifyCrossCompiling(CpuFeature f) { 77 static bool VerifyCrossCompiling(CpuFeature f) {
78 // There are no optional features for ARM64. 78 // There are no optional features for ARM64.
79 USE(f); 79 USE(f);
80 ASSERT(cross_compile_ == 0); 80 ASSERT(cross_compile_ == 0);
81 return true; 81 return true;
82 } 82 }
83 83
84 static bool SupportsCrankshaft() { return true; }
85
84 private: 86 private:
85 // Return the content of the cache type register. 87 // Return the content of the cache type register.
86 static uint32_t GetCacheType(); 88 static uint32_t GetCacheType();
87 89
88 // I and D cache line size in bytes. 90 // I and D cache line size in bytes.
89 static unsigned icache_line_size_; 91 static unsigned icache_line_size_;
90 static unsigned dcache_line_size_; 92 static unsigned dcache_line_size_;
91 93
92 #ifdef DEBUG 94 #ifdef DEBUG
93 static bool initialized_; 95 static bool initialized_;
94 #endif 96 #endif
95 97
96 // This isn't used (and is always 0), but it is required by V8. 98 // This isn't used (and is always 0), but it is required by V8.
97 static unsigned found_by_runtime_probing_only_; 99 static unsigned found_by_runtime_probing_only_;
98 100
99 static unsigned cross_compile_; 101 static unsigned cross_compile_;
100 102
101 friend class PlatformFeatureScope; 103 friend class PlatformFeatureScope;
102 DISALLOW_COPY_AND_ASSIGN(CpuFeatures); 104 DISALLOW_COPY_AND_ASSIGN(CpuFeatures);
103 }; 105 };
104 106
105 } } // namespace v8::internal 107 } } // namespace v8::internal
106 108
107 #endif // V8_ARM64_CPU_ARM64_H_ 109 #endif // V8_ARM64_CPU_ARM64_H_
OLDNEW
« src/arm/assembler-arm.cc ('K') | « src/arm/cpu-arm.cc ('k') | src/arm64/cpu-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698