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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 SSE2 = 26, | 365 SSE2 = 26, |
366 CMOV = 15, | 366 CMOV = 15, |
367 RDTSC = 4, | 367 RDTSC = 4, |
368 CPUID = 10, | 368 CPUID = 10, |
369 SAHF = 0}; | 369 SAHF = 0}; |
370 // Detect features of the target CPU. Set safe defaults if the serializer | 370 // Detect features of the target CPU. Set safe defaults if the serializer |
371 // is enabled (snapshots must be portable). | 371 // is enabled (snapshots must be portable). |
372 static void Probe(); | 372 static void Probe(); |
373 // Check whether a feature is supported by the target CPU. | 373 // Check whether a feature is supported by the target CPU. |
374 static bool IsSupported(Feature f) { | 374 static bool IsSupported(Feature f) { |
| 375 if (f == SSE2 && !FLAG_enable_sse2) return false; |
| 376 if (f == SSE3 && !FLAG_enable_sse3) return false; |
| 377 if (f == CMOV && !FLAG_enable_cmov) return false; |
| 378 if (f == RDTSC && !FLAG_enable_rdtsc) return false; |
| 379 if (f == SAHF && !FLAG_enable_sahf) return false; |
375 return (supported_ & (V8_UINT64_C(1) << f)) != 0; | 380 return (supported_ & (V8_UINT64_C(1) << f)) != 0; |
376 } | 381 } |
377 // Check whether a feature is currently enabled. | 382 // Check whether a feature is currently enabled. |
378 static bool IsEnabled(Feature f) { | 383 static bool IsEnabled(Feature f) { |
379 return (enabled_ & (V8_UINT64_C(1) << f)) != 0; | 384 return (enabled_ & (V8_UINT64_C(1) << f)) != 0; |
380 } | 385 } |
381 // Enable a specified feature within a scope. | 386 // Enable a specified feature within a scope. |
382 class Scope BASE_EMBEDDED { | 387 class Scope BASE_EMBEDDED { |
383 #ifdef DEBUG | 388 #ifdef DEBUG |
384 public: | 389 public: |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1315 private: | 1320 private: |
1316 Assembler* assembler_; | 1321 Assembler* assembler_; |
1317 #ifdef DEBUG | 1322 #ifdef DEBUG |
1318 int space_before_; | 1323 int space_before_; |
1319 #endif | 1324 #endif |
1320 }; | 1325 }; |
1321 | 1326 |
1322 } } // namespace v8::internal | 1327 } } // namespace v8::internal |
1323 | 1328 |
1324 #endif // V8_X64_ASSEMBLER_X64_H_ | 1329 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |