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 3834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3845 | 3845 |
3846 void LCodeGen::DoMathLog(LMathLog* instr) { | 3846 void LCodeGen::DoMathLog(LMathLog* instr) { |
3847 ASSERT(instr->IsMarkedAsCall()); | 3847 ASSERT(instr->IsMarkedAsCall()); |
3848 ASSERT(ToDoubleRegister(instr->value()).is(d0)); | 3848 ASSERT(ToDoubleRegister(instr->value()).is(d0)); |
3849 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), | 3849 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), |
3850 0, 1); | 3850 0, 1); |
3851 ASSERT(ToDoubleRegister(instr->result()).Is(d0)); | 3851 ASSERT(ToDoubleRegister(instr->result()).Is(d0)); |
3852 } | 3852 } |
3853 | 3853 |
3854 | 3854 |
| 3855 void LCodeGen::DoMathClz32(LMathClz32* instr) { |
| 3856 Register input = ToRegister32(instr->value()); |
| 3857 Register result = ToRegister32(instr->result()); |
| 3858 __ Clz(result, input); |
| 3859 } |
| 3860 |
| 3861 |
3855 void LCodeGen::DoMathPowHalf(LMathPowHalf* instr) { | 3862 void LCodeGen::DoMathPowHalf(LMathPowHalf* instr) { |
3856 DoubleRegister input = ToDoubleRegister(instr->value()); | 3863 DoubleRegister input = ToDoubleRegister(instr->value()); |
3857 DoubleRegister result = ToDoubleRegister(instr->result()); | 3864 DoubleRegister result = ToDoubleRegister(instr->result()); |
3858 Label done; | 3865 Label done; |
3859 | 3866 |
3860 // Math.pow(x, 0.5) differs from fsqrt(x) in the following cases: | 3867 // Math.pow(x, 0.5) differs from fsqrt(x) in the following cases: |
3861 // Math.pow(-Infinity, 0.5) == +Infinity | 3868 // Math.pow(-Infinity, 0.5) == +Infinity |
3862 // Math.pow(-0.0, 0.5) == +0.0 | 3869 // Math.pow(-0.0, 0.5) == +0.0 |
3863 | 3870 |
3864 // Catch -infinity inputs first. | 3871 // Catch -infinity inputs first. |
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5683 __ Bind(&out_of_object); | 5690 __ Bind(&out_of_object); |
5684 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5691 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
5685 // Index is equal to negated out of object property index plus 1. | 5692 // Index is equal to negated out of object property index plus 1. |
5686 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5693 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5687 __ Ldr(result, FieldMemOperand(result, | 5694 __ Ldr(result, FieldMemOperand(result, |
5688 FixedArray::kHeaderSize - kPointerSize)); | 5695 FixedArray::kHeaderSize - kPointerSize)); |
5689 __ Bind(&done); | 5696 __ Bind(&done); |
5690 } | 5697 } |
5691 | 5698 |
5692 } } // namespace v8::internal | 5699 } } // namespace v8::internal |
OLD | NEW |