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

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

Issue 6612017: Minor bug in int32 TypeRecordingBinaryOpStub. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
===================================================================
--- src/arm/code-stubs-arm.cc (revision 7050)
+++ src/arm/code-stubs-arm.cc (working copy)
@@ -872,12 +872,11 @@
// Exponent greater than 31 cannot yield 32-bit integers.
// Also, a positive value with an exponent equal to 31 is outside of the
// signed 32-bit integer range.
- __ tst(src1, Operand(HeapNumber::kSignMask));
- __ cmp(scratch, Operand(30), eq); // Executed for positive. If exponent is 30
- // the gt condition will be "correct" and
- // the next instruction will be skipped.
- __ cmp(scratch, Operand(31), ne); // Executed for negative and positive where
- // exponent is not 30.
+ // Another way to put it is that if (exponent - signbit) > 30 then the
+ // number cannot be represented as an int32.
+ Register tmp = dst;
+ __ sub(tmp, scratch, Operand(src1, LSR, 31));
+ __ cmp(tmp, Operand(30));
__ b(gt, not_int32);
// - Bits [21:0] in the mantissa are not null.
__ tst(src2, Operand(0x3fffff));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698