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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 if (f == FPU && !FLAG_enable_fpu) return false; | 406 if (f == FPU && !FLAG_enable_fpu) return false; |
407 return (supported_ & (1u << f)) != 0; | 407 return (supported_ & (1u << f)) != 0; |
408 } | 408 } |
409 | 409 |
410 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { | 410 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { |
411 ASSERT(initialized_); | 411 ASSERT(initialized_); |
412 return (found_by_runtime_probing_only_ & | 412 return (found_by_runtime_probing_only_ & |
413 (static_cast<uint64_t>(1) << f)) != 0; | 413 (static_cast<uint64_t>(1) << f)) != 0; |
414 } | 414 } |
415 | 415 |
| 416 static bool IsSafeForSnapshot(CpuFeature f) { |
| 417 return (IsSupported(f) && |
| 418 (!Serializer::enabled() || !IsFoundByRuntimeProbingOnly(f))); |
| 419 } |
| 420 |
416 private: | 421 private: |
417 #ifdef DEBUG | 422 #ifdef DEBUG |
418 static bool initialized_; | 423 static bool initialized_; |
419 #endif | 424 #endif |
420 static unsigned supported_; | 425 static unsigned supported_; |
421 static unsigned found_by_runtime_probing_only_; | 426 static unsigned found_by_runtime_probing_only_; |
422 | 427 |
423 friend class ExternalReference; | 428 friend class ExternalReference; |
424 DISALLOW_COPY_AND_ASSIGN(CpuFeatures); | 429 DISALLOW_COPY_AND_ASSIGN(CpuFeatures); |
425 }; | 430 }; |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 class EnsureSpace BASE_EMBEDDED { | 1208 class EnsureSpace BASE_EMBEDDED { |
1204 public: | 1209 public: |
1205 explicit EnsureSpace(Assembler* assembler) { | 1210 explicit EnsureSpace(Assembler* assembler) { |
1206 assembler->CheckBuffer(); | 1211 assembler->CheckBuffer(); |
1207 } | 1212 } |
1208 }; | 1213 }; |
1209 | 1214 |
1210 } } // namespace v8::internal | 1215 } } // namespace v8::internal |
1211 | 1216 |
1212 #endif // V8_ARM_ASSEMBLER_MIPS_H_ | 1217 #endif // V8_ARM_ASSEMBLER_MIPS_H_ |
OLD | NEW |