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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 static bool IsSupported(CpuFeature f) { | 456 static bool IsSupported(CpuFeature f) { |
457 if (Check(f, cross_compile_)) return true; | 457 if (Check(f, cross_compile_)) return true; |
458 ASSERT(initialized_); | 458 ASSERT(initialized_); |
459 if (f == SSE3 && !FLAG_enable_sse3) return false; | 459 if (f == SSE3 && !FLAG_enable_sse3) return false; |
460 if (f == SSE4_1 && !FLAG_enable_sse4_1) return false; | 460 if (f == SSE4_1 && !FLAG_enable_sse4_1) return false; |
461 if (f == CMOV && !FLAG_enable_cmov) return false; | 461 if (f == CMOV && !FLAG_enable_cmov) return false; |
462 if (f == SAHF && !FLAG_enable_sahf) return false; | 462 if (f == SAHF && !FLAG_enable_sahf) return false; |
463 return Check(f, supported_); | 463 return Check(f, supported_); |
464 } | 464 } |
465 | 465 |
466 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { | |
467 ASSERT(initialized_); | |
468 return Check(f, found_by_runtime_probing_only_); | |
469 } | |
470 | |
471 static bool IsSafeForSnapshot(Isolate* isolate, CpuFeature f) { | 466 static bool IsSafeForSnapshot(Isolate* isolate, CpuFeature f) { |
472 return Check(f, cross_compile_) || | 467 return Check(f, cross_compile_) || |
473 (IsSupported(f) && | 468 (IsSupported(f) && |
474 (!Serializer::enabled(isolate) || !IsFoundByRuntimeProbingOnly(f))); | 469 !(Serializer::enabled(isolate) && |
| 470 Check(f, found_by_runtime_probing_only_))); |
475 } | 471 } |
476 | 472 |
477 static bool VerifyCrossCompiling() { | 473 static bool VerifyCrossCompiling() { |
478 return cross_compile_ == 0; | 474 return cross_compile_ == 0; |
479 } | 475 } |
480 | 476 |
481 static bool VerifyCrossCompiling(CpuFeature f) { | 477 static bool VerifyCrossCompiling(CpuFeature f) { |
482 uint64_t mask = flag2set(f); | 478 uint64_t mask = flag2set(f); |
483 return cross_compile_ == 0 || | 479 return cross_compile_ == 0 || |
484 (cross_compile_ & mask) == mask; | 480 (cross_compile_ & mask) == mask; |
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1654 private: | 1650 private: |
1655 Assembler* assembler_; | 1651 Assembler* assembler_; |
1656 #ifdef DEBUG | 1652 #ifdef DEBUG |
1657 int space_before_; | 1653 int space_before_; |
1658 #endif | 1654 #endif |
1659 }; | 1655 }; |
1660 | 1656 |
1661 } } // namespace v8::internal | 1657 } } // namespace v8::internal |
1662 | 1658 |
1663 #endif // V8_X64_ASSEMBLER_X64_H_ | 1659 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |