Index: src/assembler.cc |
diff --git a/src/assembler.cc b/src/assembler.cc |
index feeef0c5729c380b784bd500dae810bf4e827515..154de32aa70aa87a96e4dec82c30e1e9dffe0504 100644 |
--- a/src/assembler.cc |
+++ b/src/assembler.cc |
@@ -234,22 +234,14 @@ PredictableCodeSizeScope::~PredictableCodeSizeScope() { |
// Implementation of CpuFeatureScope |
#ifdef DEBUG |
-CpuFeatureScope::CpuFeatureScope(AssemblerBase* assembler, CpuFeature f) |
+CpuFeatureScope::CpuFeatureScope(AssemblerBase* assembler, CpuFeature f, |
+ CheckPolicy check) |
: assembler_(assembler) { |
- DCHECK(CpuFeatures::IsSupported(f)); |
+ DCHECK_IMPLIES(check == kCheckSupported, CpuFeatures::IsSupported(f)); |
old_enabled_ = assembler_->enabled_cpu_features(); |
- uint64_t mask = static_cast<uint64_t>(1) << f; |
- // TODO(svenpanne) This special case below doesn't belong here! |
-#if V8_TARGET_ARCH_ARM |
- // ARMv7 is implied by VFP3. |
- if (f == VFP3) { |
- mask |= static_cast<uint64_t>(1) << ARMv7; |
- } |
-#endif |
- assembler_->set_enabled_cpu_features(old_enabled_ | mask); |
+ assembler_->EnableCpuFeature(f); |
} |
- |
CpuFeatureScope::~CpuFeatureScope() { |
assembler_->set_enabled_cpu_features(old_enabled_); |
} |