Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: src/ia32/code-stubs-ia32.cc

Issue 11666004: Refactoring only: Use CheckSSE2OperandIsInt32 instead of copy-n-paste code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index 23dfc24b6e9d3f12897b23ad33fe11751896b7ff..6114da947c7d82548c1ddb20b39cb3ca63f1ffcc 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, &not_int32);
+ FloatingPointHelper::CheckSSE2OperandIsInt32(
+ masm, &not_int32, xmm0, ecx, xmm2);
}
BinaryOpStub_GenerateHeapResultAllocation(masm, &call_runtime, mode_);
__ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698