Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index 7ea71e47eb059b1cf788c2970eddc211e00a5a02..3cbfa78e4404493a02805f617c3a0f32c1e41512 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -2504,6 +2504,7 @@ void TranscendentalCacheStub::Generate(MacroAssembler* masm) { |
__ bind(&loaded); |
} else { // UNTAGGED. |
+ CpuFeatures::Scope scope(SSE2); |
if (CpuFeatures::IsSupported(SSE4_1)) { |
CpuFeatures::Scope sse4_scope(SSE4_1); |
__ pextrd(edx, xmm1, 0x1); // copy xmm1[63..32] to edx. |
@@ -2576,6 +2577,7 @@ void TranscendentalCacheStub::Generate(MacroAssembler* masm) { |
__ fstp(0); |
__ ret(kPointerSize); |
} else { // UNTAGGED. |
+ CpuFeatures::Scope scope(SSE2); |
__ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset)); |
__ Ret(); |
} |
@@ -2588,6 +2590,7 @@ void TranscendentalCacheStub::Generate(MacroAssembler* masm) { |
if (tagged) { |
__ AllocateHeapNumber(eax, edi, no_reg, &runtime_call_clear_stack); |
} else { // UNTAGGED. |
+ CpuFeatures::Scope scope(SSE2); |
__ AllocateHeapNumber(eax, edi, no_reg, &skip_cache); |
__ sub(esp, Immediate(kDoubleSize)); |
__ movdbl(Operand(esp, 0), xmm1); |
@@ -2602,6 +2605,7 @@ void TranscendentalCacheStub::Generate(MacroAssembler* masm) { |
if (tagged) { |
__ ret(kPointerSize); |
} else { // UNTAGGED. |
+ CpuFeatures::Scope scope(SSE2); |
__ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset)); |
__ Ret(); |
@@ -2634,6 +2638,7 @@ void TranscendentalCacheStub::Generate(MacroAssembler* masm) { |
ExternalReference(RuntimeFunction(), masm->isolate()); |
__ TailCallExternalReference(runtime, 1, 1); |
} else { // UNTAGGED. |
+ CpuFeatures::Scope scope(SSE2); |
__ bind(&runtime_call_clear_stack); |
__ bind(&runtime_call); |
__ AllocateHeapNumber(eax, edi, no_reg, &skip_cache); |
@@ -4869,10 +4874,12 @@ void CodeStub::GenerateStubsAheadOfTime() { |
void CodeStub::GenerateFPStubs() { |
- CEntryStub save_doubles(1, kSaveFPRegs); |
- Handle<Code> code = save_doubles.GetCode(); |
- code->set_is_pregenerated(true); |
- code->GetIsolate()->set_fp_stubs_generated(true); |
+ if (CpuFeatures::IsSupported(SSE2)) { |
+ CEntryStub save_doubles(1, kSaveFPRegs); |
+ Handle<Code> code = save_doubles.GetCode(); |
+ code->set_is_pregenerated(true); |
+ code->GetIsolate()->set_fp_stubs_generated(true); |
+ } |
} |