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 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 | 804 |
805 Label positive_dividend, done; | 805 Label positive_dividend, done; |
806 __ test(dividend, Operand(dividend)); | 806 __ test(dividend, Operand(dividend)); |
807 __ j(not_sign, &positive_dividend, Label::kNear); | 807 __ j(not_sign, &positive_dividend, Label::kNear); |
808 __ neg(dividend); | 808 __ neg(dividend); |
809 __ and_(dividend, divisor - 1); | 809 __ and_(dividend, divisor - 1); |
810 __ neg(dividend); | 810 __ neg(dividend); |
811 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { | 811 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
812 __ j(not_zero, &done, Label::kNear); | 812 __ j(not_zero, &done, Label::kNear); |
813 DeoptimizeIf(no_condition, instr->environment()); | 813 DeoptimizeIf(no_condition, instr->environment()); |
| 814 } else { |
| 815 __ jmp(&done, Label::kNear); |
814 } | 816 } |
815 __ bind(&positive_dividend); | 817 __ bind(&positive_dividend); |
816 __ and_(dividend, divisor - 1); | 818 __ and_(dividend, divisor - 1); |
817 __ bind(&done); | 819 __ bind(&done); |
818 } else { | 820 } else { |
819 Label done, remainder_eq_dividend, slow, do_subtraction, both_positive; | 821 Label done, remainder_eq_dividend, slow, do_subtraction, both_positive; |
820 Register left_reg = ToRegister(instr->InputAt(0)); | 822 Register left_reg = ToRegister(instr->InputAt(0)); |
821 Register right_reg = ToRegister(instr->InputAt(1)); | 823 Register right_reg = ToRegister(instr->InputAt(1)); |
822 Register result_reg = ToRegister(instr->result()); | 824 Register result_reg = ToRegister(instr->result()); |
823 | 825 |
(...skipping 3637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4461 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 4463 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
4462 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4464 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
4463 } | 4465 } |
4464 | 4466 |
4465 | 4467 |
4466 #undef __ | 4468 #undef __ |
4467 | 4469 |
4468 } } // namespace v8::internal | 4470 } } // namespace v8::internal |
4469 | 4471 |
4470 #endif // V8_TARGET_ARCH_IA32 | 4472 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |