| 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 | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 namespace v8 { | 45 namespace v8 { |
| 46 namespace internal { | 46 namespace internal { |
| 47 | 47 |
| 48 // ----------------------------------------------------------------------------- | 48 // ----------------------------------------------------------------------------- |
| 49 // Implementation of CpuFeatures | 49 // Implementation of CpuFeatures |
| 50 | 50 |
| 51 void CpuFeatures::ProbeImpl(bool cross_compile) { | 51 void CpuFeatures::ProbeImpl(bool cross_compile) { |
| 52 CPU cpu; | 52 CPU cpu; |
| 53 CHECK(cpu.has_sse2()); // SSE2 support is mandatory. | 53 CHECK(cpu.has_sse2()); // SSE2 support is mandatory. |
| 54 CHECK(cpu.has_cmov()); // CMOV support is mandatory. | 54 CHECK(cpu.has_cmov()); // CMOV support is mandatory. |
| 55 CHECK(cpu.has_sahf()); // SAHF must be available in compat/legacy mode. | |
| 56 supported_ |= 1u << SAHF; | |
| 57 supported_ |= OS::CpuFeaturesImpliedByPlatform(); | 55 supported_ |= OS::CpuFeaturesImpliedByPlatform(); |
| 58 | 56 |
| 59 // Only use statically determined features for cross compile (snapshot). | 57 // Only use statically determined features for cross compile (snapshot). |
| 60 if (cross_compile) return; | 58 if (cross_compile) return; |
| 61 | 59 |
| 62 if (cpu.has_sse41() && FLAG_enable_sse4_1) supported_ |= 1u << SSE4_1; | 60 if (cpu.has_sse41() && FLAG_enable_sse4_1) supported_ |= 1u << SSE4_1; |
| 63 if (cpu.has_sse3() && FLAG_enable_sse3) supported_ |= 1u << SSE3; | 61 if (cpu.has_sse3() && FLAG_enable_sse3) supported_ |= 1u << SSE3; |
| 64 } | 62 } |
| 65 | 63 |
| 66 | 64 |
| (...skipping 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2630 fprintf(coverage_log, "%s\n", file_line); | 2628 fprintf(coverage_log, "%s\n", file_line); |
| 2631 fflush(coverage_log); | 2629 fflush(coverage_log); |
| 2632 } | 2630 } |
| 2633 } | 2631 } |
| 2634 | 2632 |
| 2635 #endif | 2633 #endif |
| 2636 | 2634 |
| 2637 } } // namespace v8::internal | 2635 } } // namespace v8::internal |
| 2638 | 2636 |
| 2639 #endif // V8_TARGET_ARCH_IA32 | 2637 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |