Chromium Code Reviews| Index: src/assembler.cc |
| diff --git a/src/assembler.cc b/src/assembler.cc |
| index fbff62dd65ef87773461b377ea09f557068c0dc7..c3beb3a63bf71a9830bb8648dc3e5e1356000026 100644 |
| --- a/src/assembler.cc |
| +++ b/src/assembler.cc |
| @@ -207,6 +207,27 @@ CpuFeatureScope::~CpuFeatureScope() { |
| // ----------------------------------------------------------------------------- |
| +// Implementation of PlatformFeatureScope |
| + |
| +PlatformFeatureScope::PlatformFeatureScope(CpuFeature f) |
| + : old_supported_(CpuFeatures::supported_), |
| + old_found_by_runtime_probing_only_( |
| + CpuFeatures::found_by_runtime_probing_only_) { |
| + uint64_t mask = static_cast<uint64_t>(1) << f; |
| + CpuFeatures::supported_ |= mask; |
| + CpuFeatures::found_by_runtime_probing_only_ |= mask; |
|
Sven Panne
2013/09/17 12:37:35
Huh? "... &= ~mask" seems to be more straightforwa
|
| + CpuFeatures::found_by_runtime_probing_only_ ^= mask; |
| +} |
| + |
| + |
| +PlatformFeatureScope::~PlatformFeatureScope() { |
| + CpuFeatures::supported_ = old_supported_; |
| + CpuFeatures::found_by_runtime_probing_only_ = |
| + old_found_by_runtime_probing_only_; |
| +} |
| + |
| + |
| +// ----------------------------------------------------------------------------- |
| // Implementation of Label |
| int Label::pos() const { |