| OLD | NEW | 
|     1 // Copyright 2012 the V8 project authors. All rights reserved. |     1 // Copyright 2012 the V8 project authors. All rights reserved. | 
|     2 // Redistribution and use in source and binary forms, with or without |     2 // Redistribution and use in source and binary forms, with or without | 
|     3 // modification, are permitted provided that the following conditions are |     3 // modification, are permitted provided that the following conditions are | 
|     4 // met: |     4 // met: | 
|     5 // |     5 // | 
|     6 //     * Redistributions of source code must retain the above copyright |     6 //     * Redistributions of source code must retain the above copyright | 
|     7 //       notice, this list of conditions and the following disclaimer. |     7 //       notice, this list of conditions and the following disclaimer. | 
|     8 //     * Redistributions in binary form must reproduce the above |     8 //     * Redistributions in binary form must reproduce the above | 
|     9 //       copyright notice, this list of conditions and the following |     9 //       copyright notice, this list of conditions and the following | 
|    10 //       disclaimer in the documentation and/or other materials provided |    10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|    45 uint64_t CpuFeatures::supported_ = CpuFeatures::kDefaultCpuFeatures; |    45 uint64_t CpuFeatures::supported_ = CpuFeatures::kDefaultCpuFeatures; | 
|    46 uint64_t CpuFeatures::found_by_runtime_probing_only_ = 0; |    46 uint64_t CpuFeatures::found_by_runtime_probing_only_ = 0; | 
|    47 uint64_t CpuFeatures::cross_compile_ = 0; |    47 uint64_t CpuFeatures::cross_compile_ = 0; | 
|    48  |    48  | 
|    49 ExternalReference ExternalReference::cpu_features() { |    49 ExternalReference ExternalReference::cpu_features() { | 
|    50   ASSERT(CpuFeatures::initialized_); |    50   ASSERT(CpuFeatures::initialized_); | 
|    51   return ExternalReference(&CpuFeatures::supported_); |    51   return ExternalReference(&CpuFeatures::supported_); | 
|    52 } |    52 } | 
|    53  |    53  | 
|    54  |    54  | 
|    55 void CpuFeatures::Probe() { |    55 void CpuFeatures::Probe(bool serializer_enabled) { | 
|    56   ASSERT(supported_ == CpuFeatures::kDefaultCpuFeatures); |    56   ASSERT(supported_ == CpuFeatures::kDefaultCpuFeatures); | 
|    57 #ifdef DEBUG |    57 #ifdef DEBUG | 
|    58   initialized_ = true; |    58   initialized_ = true; | 
|    59 #endif |    59 #endif | 
|    60   supported_ = kDefaultCpuFeatures; |    60   supported_ = kDefaultCpuFeatures; | 
|    61   if (Serializer::enabled()) { |    61   if (serializer_enabled) { | 
|    62     supported_ |= OS::CpuFeaturesImpliedByPlatform(); |    62     supported_ |= OS::CpuFeaturesImpliedByPlatform(); | 
|    63     return;  // No features if we might serialize. |    63     return;  // No features if we might serialize. | 
|    64   } |    64   } | 
|    65  |    65  | 
|    66   uint64_t probed_features = 0; |    66   uint64_t probed_features = 0; | 
|    67   CPU cpu; |    67   CPU cpu; | 
|    68   if (cpu.has_sse41()) { |    68   if (cpu.has_sse41()) { | 
|    69     probed_features |= static_cast<uint64_t>(1) << SSE4_1; |    69     probed_features |= static_cast<uint64_t>(1) << SSE4_1; | 
|    70   } |    70   } | 
|    71   if (cpu.has_sse3()) { |    71   if (cpu.has_sse3()) { | 
| (...skipping 2944 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3016  |  3016  | 
|  3017  |  3017  | 
|  3018 bool RelocInfo::IsInConstantPool() { |  3018 bool RelocInfo::IsInConstantPool() { | 
|  3019   return false; |  3019   return false; | 
|  3020 } |  3020 } | 
|  3021  |  3021  | 
|  3022  |  3022  | 
|  3023 } }  // namespace v8::internal |  3023 } }  // namespace v8::internal | 
|  3024  |  3024  | 
|  3025 #endif  // V8_TARGET_ARCH_X64 |  3025 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW |