| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 | 802 |
| 803 Label positive_dividend, done; | 803 Label positive_dividend, done; |
| 804 __ testl(dividend, dividend); | 804 __ testl(dividend, dividend); |
| 805 __ j(not_sign, &positive_dividend, Label::kNear); | 805 __ j(not_sign, &positive_dividend, Label::kNear); |
| 806 __ negl(dividend); | 806 __ negl(dividend); |
| 807 __ andl(dividend, Immediate(divisor - 1)); | 807 __ andl(dividend, Immediate(divisor - 1)); |
| 808 __ negl(dividend); | 808 __ negl(dividend); |
| 809 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { | 809 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
| 810 __ j(not_zero, &done, Label::kNear); | 810 __ j(not_zero, &done, Label::kNear); |
| 811 DeoptimizeIf(no_condition, instr->environment()); | 811 DeoptimizeIf(no_condition, instr->environment()); |
| 812 } else { |
| 813 __ jmp(&done, Label::kNear); |
| 812 } | 814 } |
| 813 __ bind(&positive_dividend); | 815 __ bind(&positive_dividend); |
| 814 __ andl(dividend, Immediate(divisor - 1)); | 816 __ andl(dividend, Immediate(divisor - 1)); |
| 815 __ bind(&done); | 817 __ bind(&done); |
| 816 } else { | 818 } else { |
| 817 Label done, remainder_eq_dividend, slow, do_subtraction, both_positive; | 819 Label done, remainder_eq_dividend, slow, do_subtraction, both_positive; |
| 818 Register left_reg = ToRegister(instr->InputAt(0)); | 820 Register left_reg = ToRegister(instr->InputAt(0)); |
| 819 Register right_reg = ToRegister(instr->InputAt(1)); | 821 Register right_reg = ToRegister(instr->InputAt(1)); |
| 820 Register result_reg = ToRegister(instr->result()); | 822 Register result_reg = ToRegister(instr->result()); |
| 821 | 823 |
| (...skipping 3447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4269 RegisterEnvironmentForDeoptimization(environment); | 4271 RegisterEnvironmentForDeoptimization(environment); |
| 4270 ASSERT(osr_pc_offset_ == -1); | 4272 ASSERT(osr_pc_offset_ == -1); |
| 4271 osr_pc_offset_ = masm()->pc_offset(); | 4273 osr_pc_offset_ = masm()->pc_offset(); |
| 4272 } | 4274 } |
| 4273 | 4275 |
| 4274 #undef __ | 4276 #undef __ |
| 4275 | 4277 |
| 4276 } } // namespace v8::internal | 4278 } } // namespace v8::internal |
| 4277 | 4279 |
| 4278 #endif // V8_TARGET_ARCH_X64 | 4280 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |