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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 Probe(false); | 217 Probe(false); |
218 return supported_; | 218 return supported_; |
219 } | 219 } |
220 | 220 |
221 static bool IsSupported(CpuFeature f) { | 221 static bool IsSupported(CpuFeature f) { |
222 return (supported_ & (1u << f)) != 0; | 222 return (supported_ & (1u << f)) != 0; |
223 } | 223 } |
224 | 224 |
225 static inline bool SupportsCrankshaft(); | 225 static inline bool SupportsCrankshaft(); |
226 | 226 |
227 static inline unsigned cache_line_size() { | 227 static inline unsigned icache_line_size() { |
228 DCHECK(cache_line_size_ != 0); | 228 DCHECK(icache_line_size_ != 0); |
229 return cache_line_size_; | 229 return icache_line_size_; |
| 230 } |
| 231 |
| 232 static inline unsigned dcache_line_size() { |
| 233 DCHECK(dcache_line_size_ != 0); |
| 234 return dcache_line_size_; |
230 } | 235 } |
231 | 236 |
232 static void PrintTarget(); | 237 static void PrintTarget(); |
233 static void PrintFeatures(); | 238 static void PrintFeatures(); |
234 | 239 |
235 private: | 240 private: |
236 friend class ExternalReference; | 241 friend class ExternalReference; |
237 friend class AssemblerBase; | 242 friend class AssemblerBase; |
238 // Flush instruction cache. | 243 // Flush instruction cache. |
239 static void FlushICache(void* start, size_t size); | 244 static void FlushICache(void* start, size_t size); |
240 | 245 |
241 // Platform-dependent implementation. | 246 // Platform-dependent implementation. |
242 static void ProbeImpl(bool cross_compile); | 247 static void ProbeImpl(bool cross_compile); |
243 | 248 |
244 static unsigned supported_; | 249 static unsigned supported_; |
245 static unsigned cache_line_size_; | 250 static unsigned icache_line_size_; |
| 251 static unsigned dcache_line_size_; |
246 static bool initialized_; | 252 static bool initialized_; |
247 DISALLOW_COPY_AND_ASSIGN(CpuFeatures); | 253 DISALLOW_COPY_AND_ASSIGN(CpuFeatures); |
248 }; | 254 }; |
249 | 255 |
250 | 256 |
251 // ----------------------------------------------------------------------------- | 257 // ----------------------------------------------------------------------------- |
252 // Labels represent pc locations; they are typically jump or call targets. | 258 // Labels represent pc locations; they are typically jump or call targets. |
253 // After declaration, a label can be freely used to denote known or (yet) | 259 // After declaration, a label can be freely used to denote known or (yet) |
254 // unknown pc location. Assembler::bind() is used to bind a label to the | 260 // unknown pc location. Assembler::bind() is used to bind a label to the |
255 // current pc. A label can be bound only once. | 261 // current pc. A label can be bound only once. |
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 std::vector<ConstantPoolEntry> shared_entries; | 1305 std::vector<ConstantPoolEntry> shared_entries; |
1300 }; | 1306 }; |
1301 | 1307 |
1302 Label emitted_label_; // Records pc_offset of emitted pool | 1308 Label emitted_label_; // Records pc_offset of emitted pool |
1303 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; | 1309 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; |
1304 }; | 1310 }; |
1305 | 1311 |
1306 } // namespace internal | 1312 } // namespace internal |
1307 } // namespace v8 | 1313 } // namespace v8 |
1308 #endif // V8_ASSEMBLER_H_ | 1314 #endif // V8_ASSEMBLER_H_ |
OLD | NEW |