From: svenpanne@chromium.org Date: Fri, 21 Dec 2012 10:19:42 +0000 (+0000) Subject: Refactoring only: Use CheckSSE2OperandIsInt32 instead of copy-n-paste code. X-Git-Tag: upstream/4.7.83~15393 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93998c58ef4f4b52cd7dde78c8b7e4d7e4dd241f;p=platform%2Fupstream%2Fv8.git Refactoring only: Use CheckSSE2OperandIsInt32 instead of copy-n-paste code. Review URL: https://codereview.chromium.org/11666004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc index 23dfc24b6..6114da947 100644 --- a/src/ia32/code-stubs-ia32.cc +++ b/src/ia32/code-stubs-ia32.cc @@ -1757,12 +1757,8 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) { } // Check result type if it is currently Int32. if (result_type_ <= BinaryOpIC::INT32) { - __ cvttsd2si(ecx, Operand(xmm0)); - __ cvtsi2sd(xmm2, ecx); - __ pcmpeqd(xmm2, xmm0); - __ movmskpd(ecx, xmm2); - __ test(ecx, Immediate(1)); - __ j(zero, ¬_int32); + FloatingPointHelper::CheckSSE2OperandIsInt32( + masm, ¬_int32, xmm0, ecx, xmm2); } BinaryOpStub_GenerateHeapResultAllocation(masm, &call_runtime, mode_); __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);