Index: src/assembler.cc |
diff --git a/src/assembler.cc b/src/assembler.cc |
index cd2bedd4287ea40655c12f56a5442e51c198d826..c6228eb353eaad7da8a18f10f8c5a84c07215f3e 100644 |
--- a/src/assembler.cc |
+++ b/src/assembler.cc |
@@ -211,6 +211,9 @@ CpuFeatureScope::~CpuFeatureScope() { |
PlatformFeatureScope::PlatformFeatureScope(CpuFeature f) |
: old_cross_compile_(CpuFeatures::cross_compile_) { |
+ // CpuFeatures is a global singleton, therefore this is only safe in |
+ // single threaded code. |
+ ASSERT(Serializer::enabled()); |
uint64_t mask = static_cast<uint64_t>(1) << f; |
CpuFeatures::cross_compile_ |= mask; |
} |