| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 DwVfpRegister divisor = ToDoubleRegister(instr->temp3()); | 1009 DwVfpRegister divisor = ToDoubleRegister(instr->temp3()); |
| 1010 DwVfpRegister quotient = double_scratch0(); | 1010 DwVfpRegister quotient = double_scratch0(); |
| 1011 | 1011 |
| 1012 ASSERT(!dividend.is(divisor)); | 1012 ASSERT(!dividend.is(divisor)); |
| 1013 ASSERT(!dividend.is(quotient)); | 1013 ASSERT(!dividend.is(quotient)); |
| 1014 ASSERT(!divisor.is(quotient)); | 1014 ASSERT(!divisor.is(quotient)); |
| 1015 ASSERT(!scratch.is(left)); | 1015 ASSERT(!scratch.is(left)); |
| 1016 ASSERT(!scratch.is(right)); | 1016 ASSERT(!scratch.is(right)); |
| 1017 ASSERT(!scratch.is(result)); | 1017 ASSERT(!scratch.is(result)); |
| 1018 | 1018 |
| 1019 Label done, vfp_modulo, both_positive, right_negative; | 1019 Label vfp_modulo, both_positive, right_negative; |
| 1020 | 1020 |
| 1021 // Check for x % 0. | 1021 // Check for x % 0. |
| 1022 if (instr->hydrogen()->CheckFlag(HValue::kCanBeDivByZero)) { | 1022 if (instr->hydrogen()->CheckFlag(HValue::kCanBeDivByZero)) { |
| 1023 __ cmp(right, Operand(0)); | 1023 __ cmp(right, Operand(0)); |
| 1024 DeoptimizeIf(eq, instr->environment()); | 1024 DeoptimizeIf(eq, instr->environment()); |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 __ Move(result, left); | 1027 __ Move(result, left); |
| 1028 | 1028 |
| 1029 // (0 % x) must yield 0 (if x is finite, which is the case here). | 1029 // (0 % x) must yield 0 (if x is finite, which is the case here). |
| (...skipping 4653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5683 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5683 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 5684 __ ldr(result, FieldMemOperand(scratch, | 5684 __ ldr(result, FieldMemOperand(scratch, |
| 5685 FixedArray::kHeaderSize - kPointerSize)); | 5685 FixedArray::kHeaderSize - kPointerSize)); |
| 5686 __ bind(&done); | 5686 __ bind(&done); |
| 5687 } | 5687 } |
| 5688 | 5688 |
| 5689 | 5689 |
| 5690 #undef __ | 5690 #undef __ |
| 5691 | 5691 |
| 5692 } } // namespace v8::internal | 5692 } } // namespace v8::internal |
| OLD | NEW |