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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 public: | 448 public: |
449 // Detect features of the target CPU. Set safe defaults if the serializer | 449 // Detect features of the target CPU. Set safe defaults if the serializer |
450 // is enabled (snapshots must be portable). | 450 // is enabled (snapshots must be portable). |
451 static void Probe(); | 451 static void Probe(); |
452 | 452 |
453 // Check whether a feature is supported by the target CPU. | 453 // Check whether a feature is supported by the target CPU. |
454 static bool IsSupported(CpuFeature f) { | 454 static bool IsSupported(CpuFeature f) { |
455 ASSERT(initialized_); | 455 ASSERT(initialized_); |
456 if (f == SSE2 && !FLAG_enable_sse2) return false; | 456 if (f == SSE2 && !FLAG_enable_sse2) return false; |
457 if (f == SSE3 && !FLAG_enable_sse3) return false; | 457 if (f == SSE3 && !FLAG_enable_sse3) return false; |
| 458 if (f == SSE4_1 && !FLAG_enable_sse4_1) return false; |
458 if (f == CMOV && !FLAG_enable_cmov) return false; | 459 if (f == CMOV && !FLAG_enable_cmov) return false; |
459 if (f == RDTSC && !FLAG_enable_rdtsc) return false; | 460 if (f == RDTSC && !FLAG_enable_rdtsc) return false; |
460 if (f == SAHF && !FLAG_enable_sahf) return false; | 461 if (f == SAHF && !FLAG_enable_sahf) return false; |
461 return (supported_ & (V8_UINT64_C(1) << f)) != 0; | 462 return (supported_ & (V8_UINT64_C(1) << f)) != 0; |
462 } | 463 } |
463 | 464 |
464 #ifdef DEBUG | 465 #ifdef DEBUG |
465 // Check whether a feature is currently enabled. | 466 // Check whether a feature is currently enabled. |
466 static bool IsEnabled(CpuFeature f) { | 467 static bool IsEnabled(CpuFeature f) { |
467 ASSERT(initialized_); | 468 ASSERT(initialized_); |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 private: | 1665 private: |
1665 Assembler* assembler_; | 1666 Assembler* assembler_; |
1666 #ifdef DEBUG | 1667 #ifdef DEBUG |
1667 int space_before_; | 1668 int space_before_; |
1668 #endif | 1669 #endif |
1669 }; | 1670 }; |
1670 | 1671 |
1671 } } // namespace v8::internal | 1672 } } // namespace v8::internal |
1672 | 1673 |
1673 #endif // V8_X64_ASSEMBLER_X64_H_ | 1674 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |