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