OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 // } | 169 // } |
170 class CpuFeatures : public AllStatic { | 170 class CpuFeatures : public AllStatic { |
171 public: | 171 public: |
172 static void Probe(bool cross_compile) { | 172 static void Probe(bool cross_compile) { |
173 STATIC_ASSERT(NUMBER_OF_CPU_FEATURES <= kBitsPerInt); | 173 STATIC_ASSERT(NUMBER_OF_CPU_FEATURES <= kBitsPerInt); |
174 if (initialized_) return; | 174 if (initialized_) return; |
175 initialized_ = true; | 175 initialized_ = true; |
176 ProbeImpl(cross_compile); | 176 ProbeImpl(cross_compile); |
177 } | 177 } |
178 | 178 |
| 179 static unsigned SupportedFeatures() { |
| 180 Probe(false); |
| 181 return supported_; |
| 182 } |
| 183 |
179 static bool IsSupported(CpuFeature f) { | 184 static bool IsSupported(CpuFeature f) { |
180 return (supported_ & (1u << f)) != 0; | 185 return (supported_ & (1u << f)) != 0; |
181 } | 186 } |
182 | 187 |
183 static inline bool SupportsCrankshaft(); | 188 static inline bool SupportsCrankshaft(); |
184 | 189 |
185 static inline unsigned cache_line_size() { | 190 static inline unsigned cache_line_size() { |
186 DCHECK(cache_line_size_ != 0); | 191 DCHECK(cache_line_size_ != 0); |
187 return cache_line_size_; | 192 return cache_line_size_; |
188 } | 193 } |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 | 1125 |
1121 private: | 1126 private: |
1122 int32_t multiplier_; | 1127 int32_t multiplier_; |
1123 int32_t shift_; | 1128 int32_t shift_; |
1124 }; | 1129 }; |
1125 | 1130 |
1126 | 1131 |
1127 } } // namespace v8::internal | 1132 } } // namespace v8::internal |
1128 | 1133 |
1129 #endif // V8_ASSEMBLER_H_ | 1134 #endif // V8_ASSEMBLER_H_ |
OLD | NEW |