| Index: src/x64/code-stubs-x64.cc
|
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
|
| index 12c0ec55473d6277c892b4bed35f1dac7c2b3b37..0f633874e6750a33411dd3449e9ed03d01f28e26 100644
|
| --- a/src/x64/code-stubs-x64.cc
|
| +++ b/src/x64/code-stubs-x64.cc
|
| @@ -1422,12 +1422,23 @@ void TypeRecordingBinaryOpStub::GenerateCallRuntimeCode(MacroAssembler* masm) {
|
|
|
|
|
| void TypeRecordingBinaryOpStub::GenerateSmiStub(MacroAssembler* masm) {
|
| - Label not_smi;
|
| -
|
| - GenerateSmiCode(masm, ¬_smi, NO_HEAPNUMBER_RESULTS);
|
| + Label call_runtime;
|
| + if (result_type_ == TRBinaryOpIC::UNINITIALIZED ||
|
| + result_type_ == TRBinaryOpIC::SMI) {
|
| + // Only allow smi results.
|
| + GenerateSmiCode(masm, NULL, NO_HEAPNUMBER_RESULTS);
|
| + } else {
|
| + // Allow heap number result and don't make a transition if a heap number
|
| + // cannot be allocated.
|
| + GenerateSmiCode(masm, &call_runtime, ALLOW_HEAPNUMBER_RESULTS);
|
| + }
|
|
|
| - __ bind(¬_smi);
|
| + // Code falls through if the result is not returned as either a smi or heap
|
| + // number.
|
| GenerateTypeTransition(masm);
|
| +
|
| + __ bind(&call_runtime);
|
| + GenerateCallRuntimeCode(masm);
|
| }
|
|
|
|
|
| @@ -2961,8 +2972,6 @@ void NumberToStringStub::GenerateLookupNumberStringCache(MacroAssembler* masm,
|
| times_1,
|
| FixedArray::kHeaderSize));
|
| __ JumpIfSmi(probe, not_found);
|
| - ASSERT(CpuFeatures::IsSupported(SSE2));
|
| - CpuFeatures::Scope fscope(SSE2);
|
| __ movsd(xmm0, FieldOperand(object, HeapNumber::kValueOffset));
|
| __ movsd(xmm1, FieldOperand(probe, HeapNumber::kValueOffset));
|
| __ ucomisd(xmm0, xmm1);
|
|
|