OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 3794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3805 __ movq(output_reg, input_reg); | 3805 __ movq(output_reg, input_reg); |
3806 __ testq(output_reg, output_reg); | 3806 __ testq(output_reg, output_reg); |
3807 __ RecordComment("Minus zero"); | 3807 __ RecordComment("Minus zero"); |
3808 DeoptimizeIf(negative, instr->environment()); | 3808 DeoptimizeIf(negative, instr->environment()); |
3809 } | 3809 } |
3810 __ Set(output_reg, 0); | 3810 __ Set(output_reg, 0); |
3811 __ bind(&done); | 3811 __ bind(&done); |
3812 } | 3812 } |
3813 | 3813 |
3814 | 3814 |
| 3815 void LCodeGen::DoMathFround(LMathFround* instr) { |
| 3816 XMMRegister input_reg = ToDoubleRegister(instr->value()); |
| 3817 XMMRegister output_reg = ToDoubleRegister(instr->result()); |
| 3818 __ cvtsd2ss(output_reg, input_reg); |
| 3819 __ cvtss2sd(output_reg, output_reg); |
| 3820 } |
| 3821 |
| 3822 |
3815 void LCodeGen::DoMathSqrt(LMathSqrt* instr) { | 3823 void LCodeGen::DoMathSqrt(LMathSqrt* instr) { |
3816 XMMRegister output = ToDoubleRegister(instr->result()); | 3824 XMMRegister output = ToDoubleRegister(instr->result()); |
3817 if (instr->value()->IsDoubleRegister()) { | 3825 if (instr->value()->IsDoubleRegister()) { |
3818 XMMRegister input = ToDoubleRegister(instr->value()); | 3826 XMMRegister input = ToDoubleRegister(instr->value()); |
3819 __ sqrtsd(output, input); | 3827 __ sqrtsd(output, input); |
3820 } else { | 3828 } else { |
3821 Operand input = ToOperand(instr->value()); | 3829 Operand input = ToOperand(instr->value()); |
3822 __ sqrtsd(output, input); | 3830 __ sqrtsd(output, input); |
3823 } | 3831 } |
3824 } | 3832 } |
(...skipping 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5844 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5852 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5845 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5853 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5846 } | 5854 } |
5847 | 5855 |
5848 | 5856 |
5849 #undef __ | 5857 #undef __ |
5850 | 5858 |
5851 } } // namespace v8::internal | 5859 } } // namespace v8::internal |
5852 | 5860 |
5853 #endif // V8_TARGET_ARCH_X64 | 5861 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |