| 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 static bool IsSupported(CpuFeature f) { | 536 static bool IsSupported(CpuFeature f) { |
| 537 ASSERT(initialized_); | 537 ASSERT(initialized_); |
| 538 if (Check(f, cross_compile_)) return true; | 538 if (Check(f, cross_compile_)) return true; |
| 539 if (f == SSE2 && !FLAG_enable_sse2) return false; | 539 if (f == SSE2 && !FLAG_enable_sse2) return false; |
| 540 if (f == SSE3 && !FLAG_enable_sse3) return false; | 540 if (f == SSE3 && !FLAG_enable_sse3) return false; |
| 541 if (f == SSE4_1 && !FLAG_enable_sse4_1) return false; | 541 if (f == SSE4_1 && !FLAG_enable_sse4_1) return false; |
| 542 if (f == CMOV && !FLAG_enable_cmov) return false; | 542 if (f == CMOV && !FLAG_enable_cmov) return false; |
| 543 return Check(f, supported_); | 543 return Check(f, supported_); |
| 544 } | 544 } |
| 545 | 545 |
| 546 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { | |
| 547 ASSERT(initialized_); | |
| 548 return Check(f, found_by_runtime_probing_only_); | |
| 549 } | |
| 550 | |
| 551 static bool IsSafeForSnapshot(Isolate* isolate, CpuFeature f) { | 546 static bool IsSafeForSnapshot(Isolate* isolate, CpuFeature f) { |
| 552 return Check(f, cross_compile_) || | 547 return Check(f, cross_compile_) || |
| 553 (IsSupported(f) && | 548 (IsSupported(f) && |
| 554 (!Serializer::enabled(isolate) || !IsFoundByRuntimeProbingOnly(f))); | 549 !(Serializer::enabled(isolate) && |
| 550 Check(f, found_by_runtime_probing_only_))); |
| 555 } | 551 } |
| 556 | 552 |
| 557 static bool VerifyCrossCompiling() { | 553 static bool VerifyCrossCompiling() { |
| 558 return cross_compile_ == 0; | 554 return cross_compile_ == 0; |
| 559 } | 555 } |
| 560 | 556 |
| 561 static bool VerifyCrossCompiling(CpuFeature f) { | 557 static bool VerifyCrossCompiling(CpuFeature f) { |
| 562 uint64_t mask = flag2set(f); | 558 uint64_t mask = flag2set(f); |
| 563 return cross_compile_ == 0 || | 559 return cross_compile_ == 0 || |
| 564 (cross_compile_ & mask) == mask; | 560 (cross_compile_ & mask) == mask; |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 private: | 1288 private: |
| 1293 Assembler* assembler_; | 1289 Assembler* assembler_; |
| 1294 #ifdef DEBUG | 1290 #ifdef DEBUG |
| 1295 int space_before_; | 1291 int space_before_; |
| 1296 #endif | 1292 #endif |
| 1297 }; | 1293 }; |
| 1298 | 1294 |
| 1299 } } // namespace v8::internal | 1295 } } // namespace v8::internal |
| 1300 | 1296 |
| 1301 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1297 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
| OLD | NEW |