Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: src/assembler.cc

Issue 2360243002: [arm] Clean up use of IsSupported and IsEnabled. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/assembler.h ('k') | src/compiler/arm/code-generator-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_);
}
« no previous file with comments | « src/assembler.h ('k') | src/compiler/arm/code-generator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698