Reviewers: Yang,
Message:
PTAL.
Description:
Properly support undefined->0 conversion in ia32 bitwise BinaryOpStubs
(regression fix for r13624)
Please review this at https://codereview.chromium.org/12212162/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/ia32/code-stubs-ia32.cc
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index
27957d0f50844503682a3d4f8e75fe328846c184..5affd6eaf0283d429557c5a1b2e665b0376ed4ec
100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -2767,14 +2767,13 @@ void FloatingPointHelper::LoadUnknownsAsIntegers(
__ bind(&arg1_is_object);
__ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
__ cmp(ebx, factory->heap_number_map());
+ __ j(not_equal, &check_undefined_arg1);
+
+ // Get the untagged integer version of the edx heap number in ecx.
if (left_type == BinaryOpIC::INT32 && CpuFeatures::IsSupported(SSE2)) {
CpuFeatures::Scope use_sse2(SSE2);
- __ j(not_equal, conversion_failure);
- // Get the untagged integer version of the edx heap number in ecx.
ConvertHeapNumberToInt32(masm, edx, conversion_failure);
} else {
- __ j(not_equal, &check_undefined_arg1);
- // Get the untagged integer version of the edx heap number in ecx.
IntegerConvert(masm, edx, use_sse3, conversion_failure);
}
__ mov(edx, ecx);
@@ -2803,14 +2802,13 @@ void FloatingPointHelper::LoadUnknownsAsIntegers(
__ bind(&arg2_is_object);
__ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
__ cmp(ebx, factory->heap_number_map());
+ __ j(not_equal, &check_undefined_arg2);
+ // Get the untagged integer version of the eax heap number in ecx.
+
if (right_type == BinaryOpIC::INT32 && CpuFeatures::IsSupported(SSE2)) {
CpuFeatures::Scope use_sse2(SSE2);
- __ j(not_equal, conversion_failure);
- // Get the untagged integer version of the eax heap number in ecx.
ConvertHeapNumberToInt32(masm, eax, conversion_failure);
} else {
- __ j(not_equal, &check_undefined_arg2);
- // Get the untagged integer version of the eax heap number in ecx.
IntegerConvert(masm, eax, use_sse3, conversion_failure);
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.