| 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 3899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3910 // Math.pow(-0.0, 0.5) == +0.0 | 3910 // Math.pow(-0.0, 0.5) == +0.0 |
| 3911 | 3911 |
| 3912 // Catch -infinity inputs first. | 3912 // Catch -infinity inputs first. |
| 3913 // TODO(jbramley): A constant infinity register would be helpful here. | 3913 // TODO(jbramley): A constant infinity register would be helpful here. |
| 3914 __ Fmov(double_scratch(), kFP64NegativeInfinity); | 3914 __ Fmov(double_scratch(), kFP64NegativeInfinity); |
| 3915 __ Fcmp(double_scratch(), input); | 3915 __ Fcmp(double_scratch(), input); |
| 3916 __ Fabs(result, input); | 3916 __ Fabs(result, input); |
| 3917 __ B(&done, eq); | 3917 __ B(&done, eq); |
| 3918 | 3918 |
| 3919 // Add +0.0 to convert -0.0 to +0.0. | 3919 // Add +0.0 to convert -0.0 to +0.0. |
| 3920 // TODO(jbramley): A constant zero register would be helpful here. | 3920 __ Fadd(double_scratch(), input, fp_zero); |
| 3921 __ Fmov(double_scratch(), 0.0); | |
| 3922 __ Fadd(double_scratch(), input, double_scratch()); | |
| 3923 __ Fsqrt(result, double_scratch()); | 3921 __ Fsqrt(result, double_scratch()); |
| 3924 | 3922 |
| 3925 __ Bind(&done); | 3923 __ Bind(&done); |
| 3926 } | 3924 } |
| 3927 | 3925 |
| 3928 | 3926 |
| 3929 void LCodeGen::DoPower(LPower* instr) { | 3927 void LCodeGen::DoPower(LPower* instr) { |
| 3930 Representation exponent_type = instr->hydrogen()->right()->representation(); | 3928 Representation exponent_type = instr->hydrogen()->right()->representation(); |
| 3931 // Having marked this as a call, we can use any registers. | 3929 // Having marked this as a call, we can use any registers. |
| 3932 // Just make sure that the input/output registers are the expected ones. | 3930 // Just make sure that the input/output registers are the expected ones. |
| (...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5741 __ Bind(&out_of_object); | 5739 __ Bind(&out_of_object); |
| 5742 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5740 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5743 // Index is equal to negated out of object property index plus 1. | 5741 // Index is equal to negated out of object property index plus 1. |
| 5744 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5742 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5745 __ Ldr(result, FieldMemOperand(result, | 5743 __ Ldr(result, FieldMemOperand(result, |
| 5746 FixedArray::kHeaderSize - kPointerSize)); | 5744 FixedArray::kHeaderSize - kPointerSize)); |
| 5747 __ Bind(&done); | 5745 __ Bind(&done); |
| 5748 } | 5746 } |
| 5749 | 5747 |
| 5750 } } // namespace v8::internal | 5748 } } // namespace v8::internal |
| OLD | NEW |