OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1615 r1 = r1 - anc; | 1615 r1 = r1 - anc; |
1616 } | 1616 } |
1617 q2 *= 2; // Update q2 = 2**p/|d|. | 1617 q2 *= 2; // Update q2 = 2**p/|d|. |
1618 r2 *= 2; // Update r2 = rem(2**p, |d|). | 1618 r2 *= 2; // Update r2 = rem(2**p, |d|). |
1619 if (r2 >= ad) { // Must be an unsigned comparison here. | 1619 if (r2 >= ad) { // Must be an unsigned comparison here. |
1620 q2++; | 1620 q2++; |
1621 r2 = r2 - ad; | 1621 r2 = r2 - ad; |
1622 } | 1622 } |
1623 delta = ad - r2; | 1623 delta = ad - r2; |
1624 } while (q1 < delta || (q1 == delta && r1 == 0)); | 1624 } while (q1 < delta || (q1 == delta && r1 == 0)); |
1625 multiplier_ = (d < 0) ? -(q2 + 1) : (q2 + 1); | 1625 int32_t mul = static_cast<int32_t>(q2 + 1); |
| 1626 multiplier_ = (d < 0) ? -mul : mul; |
1626 shift_ = p - 32; | 1627 shift_ = p - 32; |
1627 } | 1628 } |
1628 | 1629 |
1629 } } // namespace v8::internal | 1630 } } // namespace v8::internal |
OLD | NEW |