| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 | 41 |
| 42 #ifdef DEBUG | 42 #ifdef DEBUG |
| 43 bool CpuFeatures::initialized_ = false; | 43 bool CpuFeatures::initialized_ = false; |
| 44 #endif | 44 #endif |
| 45 uint64_t CpuFeatures::supported_ = CpuFeatures::kDefaultCpuFeatures; | 45 uint64_t CpuFeatures::supported_ = CpuFeatures::kDefaultCpuFeatures; |
| 46 uint64_t CpuFeatures::found_by_runtime_probing_ = 0; | 46 uint64_t CpuFeatures::found_by_runtime_probing_ = 0; |
| 47 | 47 |
| 48 | 48 |
| 49 void CpuFeatures::Probe() { | 49 void CpuFeatures::Probe() { |
| 50 ASSERT(!initialized_); | 50 ASSERT(supported_ == CpuFeatures::kDefaultCpuFeatures); |
| 51 #ifdef DEBUG | 51 #ifdef DEBUG |
| 52 initialized_ = true; | 52 initialized_ = true; |
| 53 #endif | 53 #endif |
| 54 supported_ = kDefaultCpuFeatures; | 54 supported_ = kDefaultCpuFeatures; |
| 55 if (Serializer::enabled()) { | 55 if (Serializer::enabled()) { |
| 56 supported_ |= OS::CpuFeaturesImpliedByPlatform(); | 56 supported_ |= OS::CpuFeaturesImpliedByPlatform(); |
| 57 return; // No features if we might serialize. | 57 return; // No features if we might serialize. |
| 58 } | 58 } |
| 59 | 59 |
| 60 const int kBufferSize = 4 * KB; | 60 const int kBufferSize = 4 * KB; |
| (...skipping 2973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3034 // specially coded on x64 means that it is a relative 32 bit address, as used | 3034 // specially coded on x64 means that it is a relative 32 bit address, as used |
| 3035 // by branch instructions. | 3035 // by branch instructions. |
| 3036 return (1 << rmode_) & kApplyMask; | 3036 return (1 << rmode_) & kApplyMask; |
| 3037 } | 3037 } |
| 3038 | 3038 |
| 3039 | 3039 |
| 3040 | 3040 |
| 3041 } } // namespace v8::internal | 3041 } } // namespace v8::internal |
| 3042 | 3042 |
| 3043 #endif // V8_TARGET_ARCH_X64 | 3043 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |