Revision: 14384
Author: [email protected]
Date: Mon Apr 22 15:46:51 2013
Log: MIPS: ARM: Fix erroneous detection of Double result type in
Integer32 BinaryOpStubs
Port r14371 (b5c4a990)
BUG=
Review URL: https://codereview.chromium.org/13973013
http://code.google.com/p/v8/source/detail?r=14384
Modified:
/branches/bleeding_edge/src/mips/code-stubs-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Thu Apr 18 16:48:42
2013
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Mon Apr 22 15:46:51
2013
@@ -2511,12 +2511,17 @@
__ Addu(scratch2, scratch1, Operand(0x40000000));
// If not try to return a heap number.
__ Branch(&return_heap_number, lt, scratch2, Operand(zero_reg));
- // Check for minus zero. Return heap number for minus zero.
+ // Check for minus zero. Return heap number for minus zero if
+ // double results are allowed; otherwise transition.
Label not_zero;
__ Branch(¬_zero, ne, scratch1, Operand(zero_reg));
__ mfc1(scratch2, f11);
__ And(scratch2, scratch2, HeapNumber::kSignMask);
- __ Branch(&return_heap_number, ne, scratch2, Operand(zero_reg));
+ __ Branch(result_type_ <= BinaryOpIC::INT32 ? &transition
+ : &return_heap_number,
+ ne,
+ scratch2,
+ Operand(zero_reg));
__ bind(¬_zero);
// Tag the result and return.
@@ -2529,21 +2534,18 @@
__ bind(&return_heap_number);
// Return a heap number, or fall through to type transition or
runtime
// call if we can't.
- if (result_type_ >= ((op_ == Token::DIV) ? BinaryOpIC::NUMBER
- : BinaryOpIC::INT32)) {
- // We are using FPU registers so s0 is available.
- heap_number_result = s0;
- BinaryOpStub_GenerateHeapResultAllocation(masm,
- heap_number_result,
- heap_number_map,
- scratch1,
- scratch2,
- &call_runtime,
- mode_);
- __ mov(v0, heap_number_result);
- __ sdc1(f10, FieldMemOperand(v0, HeapNumber::kValueOffset));
- __ Ret();
- }
+ // We are using FPU registers so s0 is available.
+ heap_number_result = s0;
+ BinaryOpStub_GenerateHeapResultAllocation(masm,
+ heap_number_result,
+ heap_number_map,
+ scratch1,
+ scratch2,
+ &call_runtime,
+ mode_);
+ __ mov(v0, heap_number_result);
+ __ sdc1(f10, FieldMemOperand(v0, HeapNumber::kValueOffset));
+ __ Ret();
// A DIV operation expecting an integer result falls through
// to type transition.
--
--
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.