| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 3714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3725 // execute it already now. | 3725 // execute it already now. |
| 3726 __ Sdiv(result, left, right); | 3726 __ Sdiv(result, left, right); |
| 3727 | 3727 |
| 3728 // Check for x / 0. | 3728 // Check for x / 0. |
| 3729 DeoptimizeIfZero(right, instr->environment()); | 3729 DeoptimizeIfZero(right, instr->environment()); |
| 3730 | 3730 |
| 3731 // Check for (kMinInt / -1). | 3731 // Check for (kMinInt / -1). |
| 3732 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { | 3732 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { |
| 3733 // The V flag will be set iff left == kMinInt. | 3733 // The V flag will be set iff left == kMinInt. |
| 3734 __ Cmp(left, 1); | 3734 __ Cmp(left, 1); |
| 3735 __ Ccmp(right, -1, ZFlag, vs); | 3735 __ Ccmp(right, -1, NoFlag, vs); |
| 3736 DeoptimizeIf(eq, instr->environment()); | 3736 DeoptimizeIf(eq, instr->environment()); |
| 3737 } | 3737 } |
| 3738 | 3738 |
| 3739 // Check for (0 / -x) that will produce negative zero. | 3739 // Check for (0 / -x) that will produce negative zero. |
| 3740 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { | 3740 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
| 3741 __ Cmp(right, 0); | 3741 __ Cmp(right, 0); |
| 3742 __ Ccmp(left, 0, ZFlag, mi); | 3742 __ Ccmp(left, 0, ZFlag, mi); |
| 3743 // "right" can't be null because the code would have already been | 3743 // "right" can't be null because the code would have already been |
| 3744 // deoptimized. The Z flag is set only if (right < 0) and (left == 0). | 3744 // deoptimized. The Z flag is set only if (right < 0) and (left == 0). |
| 3745 // In this case we need to deoptimize to produce a -0. | 3745 // In this case we need to deoptimize to produce a -0. |
| (...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5469 __ Bind(&out_of_object); | 5469 __ Bind(&out_of_object); |
| 5470 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5470 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5471 // Index is equal to negated out of object property index plus 1. | 5471 // Index is equal to negated out of object property index plus 1. |
| 5472 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5472 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5473 __ Ldr(result, FieldMemOperand(result, | 5473 __ Ldr(result, FieldMemOperand(result, |
| 5474 FixedArray::kHeaderSize - kPointerSize)); | 5474 FixedArray::kHeaderSize - kPointerSize)); |
| 5475 __ Bind(&done); | 5475 __ Bind(&done); |
| 5476 } | 5476 } |
| 5477 | 5477 |
| 5478 } } // namespace v8::internal | 5478 } } // namespace v8::internal |
| OLD | NEW |