Only crosscompile binary op stubs if we compile a snapshot.

BUG=
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/26266005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
olivf@chromium.org 2013-10-10 10:37:18 +00:00
parent 5e25707540
commit 49b5c77409
2 changed files with 9 additions and 2 deletions

View File

@ -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;
}

View File

@ -2918,8 +2918,12 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
RecordWriteStub::GenerateFixedRegStubsAheadOfTime(isolate);
ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
CreateAllocationSiteStub::GenerateAheadOfTime(isolate);
PlatformFeatureScope sse2(SSE2);
BinaryOpStub::GenerateAheadOfTime(isolate);
if (Serializer::enabled()) {
PlatformFeatureScope sse2(SSE2);
BinaryOpStub::GenerateAheadOfTime(isolate);
} else {
BinaryOpStub::GenerateAheadOfTime(isolate);
}
}