| 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 3677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3688 // Note that according to ECMA-262 15.8.2.13: | 3688 // Note that according to ECMA-262 15.8.2.13: |
| 3689 // Math.pow(-Infinity, 0.5) == Infinity | 3689 // Math.pow(-Infinity, 0.5) == Infinity |
| 3690 // Math.sqrt(-Infinity) == NaN | 3690 // Math.sqrt(-Infinity) == NaN |
| 3691 Label done; | 3691 Label done; |
| 3692 __ vmov(temp, -V8_INFINITY, scratch0()); | 3692 __ vmov(temp, -V8_INFINITY, scratch0()); |
| 3693 __ VFPCompareAndSetFlags(input, temp); | 3693 __ VFPCompareAndSetFlags(input, temp); |
| 3694 __ vneg(result, temp, eq); | 3694 __ vneg(result, temp, eq); |
| 3695 __ b(&done, eq); | 3695 __ b(&done, eq); |
| 3696 | 3696 |
| 3697 // Add +0 to convert -0 to +0. | 3697 // Add +0 to convert -0 to +0. |
| 3698 __ vadd(result, input, kDoubleRegZero); | 3698 __ vadd(result, input, DwVfpRegister::ZeroReg()); |
| 3699 __ vsqrt(result, result); | 3699 __ vsqrt(result, result); |
| 3700 __ bind(&done); | 3700 __ bind(&done); |
| 3701 } | 3701 } |
| 3702 | 3702 |
| 3703 | 3703 |
| 3704 void LCodeGen::DoPower(LPower* instr) { | 3704 void LCodeGen::DoPower(LPower* instr) { |
| 3705 Representation exponent_type = instr->hydrogen()->right()->representation(); | 3705 Representation exponent_type = instr->hydrogen()->right()->representation(); |
| 3706 // Having marked this as a call, we can use any registers. | 3706 // Having marked this as a call, we can use any registers. |
| 3707 // Just make sure that the input/output registers are the expected ones. | 3707 // Just make sure that the input/output registers are the expected ones. |
| 3708 ASSERT(!instr->right()->IsDoubleRegister() || | 3708 ASSERT(!instr->right()->IsDoubleRegister() || |
| (...skipping 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5789 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5789 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 5790 __ ldr(result, FieldMemOperand(scratch, | 5790 __ ldr(result, FieldMemOperand(scratch, |
| 5791 FixedArray::kHeaderSize - kPointerSize)); | 5791 FixedArray::kHeaderSize - kPointerSize)); |
| 5792 __ bind(&done); | 5792 __ bind(&done); |
| 5793 } | 5793 } |
| 5794 | 5794 |
| 5795 | 5795 |
| 5796 #undef __ | 5796 #undef __ |
| 5797 | 5797 |
| 5798 } } // namespace v8::internal | 5798 } } // namespace v8::internal |
| OLD | NEW |