Revision: 8339
Author: [email protected]
Date: Tue Jun 21 00:34:01 2011
Log: MIPS: Port some DIV changes to BinaryOpStub::GenerateInt32Stub().
There were some changes in ARM r8172 that we needed to port to MIPS,
but missed.
The bug was exposed with the Arm & Mips fix in r8321, "Fix wrong
parenthesis in stub ARM and MIPS generation code."
BUG=
TEST=
Review URL: http://codereview.chromium.org//7211006
Patch from Paul Lind <[email protected]>.
http://code.google.com/p/v8/source/detail?r=8339
Modified:
/branches/bleeding_edge/src/mips/code-stubs-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Tue Jun 21 00:32:23
2011
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Tue Jun 21 00:34:01
2011
@@ -2789,9 +2789,11 @@
// DIV just falls through to allocating a heap number.
}
+ __ 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::HEAP_NUMBER
: BinaryOpIC::INT32)) {
- __ bind(&return_heap_number);
// We are using FPU registers so s0 is available.
heap_number_result = s0;
GenerateHeapResultAllocation(masm,
@@ -2970,7 +2972,11 @@
UNREACHABLE();
}
- if (transition.is_linked()) {
+ // We never expect DIV to yield an integer result, so we always generate
+ // type transition code for DIV operations expecting an integer result:
the
+ // code will fall through to this type transition.
+ if (transition.is_linked() ||
+ ((op_ == Token::DIV) && (result_type_ <= BinaryOpIC::INT32))) {
__ bind(&transition);
GenerateTypeTransition(masm);
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev