Commit 18a9bf69 authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Minor bug in int32 TypeRecordingBinaryOpStub.

BUG=none
TEST=none
Patch by Rodolph Perfetta from ARM Ltd.

Review URL: http://codereview.chromium.org/6612017


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 88b60ebc
...@@ -872,12 +872,11 @@ void FloatingPointHelper::DoubleIs32BitInteger(MacroAssembler* masm, ...@@ -872,12 +872,11 @@ void FloatingPointHelper::DoubleIs32BitInteger(MacroAssembler* masm,
// Exponent greater than 31 cannot yield 32-bit integers. // Exponent greater than 31 cannot yield 32-bit integers.
// Also, a positive value with an exponent equal to 31 is outside of the // Also, a positive value with an exponent equal to 31 is outside of the
// signed 32-bit integer range. // signed 32-bit integer range.
__ tst(src1, Operand(HeapNumber::kSignMask)); // Another way to put it is that if (exponent - signbit) > 30 then the
__ cmp(scratch, Operand(30), eq); // Executed for positive. If exponent is 30 // number cannot be represented as an int32.
// the gt condition will be "correct" and Register tmp = dst;
// the next instruction will be skipped. __ sub(tmp, scratch, Operand(src1, LSR, 31));
__ cmp(scratch, Operand(31), ne); // Executed for negative and positive where __ cmp(tmp, Operand(30));
// exponent is not 30.
__ b(gt, not_int32); __ b(gt, not_int32);
// - Bits [21:0] in the mantissa are not null. // - Bits [21:0] in the mantissa are not null.
__ tst(src2, Operand(0x3fffff)); __ tst(src2, Operand(0x3fffff));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment