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

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

Issue 11748013: Merged r13260, r13266, r13268, r13270, r13274 into 3.15 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.15
Patch Set: Created 7 years, 12 months 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 | « src/ia32/assembler-ia32.cc ('k') | src/ia32/disasm-ia32.cc » ('j') | 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 da8e2ae4576796285ee2fcbd769beeb3a3f05e39..a70ccbdd1de3e3e69eb0702da231388373e1ff40 100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -1745,12 +1745,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);
@@ -2858,9 +2854,11 @@ void FloatingPointHelper::CheckSSE2OperandIsInt32(MacroAssembler* masm,
__ cvttsd2si(scratch, Operand(operand));
__ cvtsi2sd(xmm_scratch, scratch);
__ pcmpeqd(xmm_scratch, operand);
- __ movmskpd(scratch, xmm_scratch);
- __ test(scratch, Immediate(1));
- __ j(zero, non_int32);
+ __ movmskps(scratch, xmm_scratch);
+ // Two least significant bits should be both set.
+ __ not_(scratch);
+ __ test(scratch, Immediate(3));
+ __ j(not_zero, non_int32);
}
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/ia32/disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698