OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 3806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3817 __ Branch(&done, ne, result, Operand(zero_reg)); | 3817 __ Branch(&done, ne, result, Operand(zero_reg)); |
3818 __ bind(&check_sign_on_zero); | 3818 __ bind(&check_sign_on_zero); |
3819 __ mfc1(scratch, input.high()); | 3819 __ mfc1(scratch, input.high()); |
3820 __ And(scratch, scratch, Operand(HeapNumber::kSignMask)); | 3820 __ And(scratch, scratch, Operand(HeapNumber::kSignMask)); |
3821 DeoptimizeIf(ne, instr->environment(), scratch, Operand(zero_reg)); | 3821 DeoptimizeIf(ne, instr->environment(), scratch, Operand(zero_reg)); |
3822 } | 3822 } |
3823 __ bind(&done); | 3823 __ bind(&done); |
3824 } | 3824 } |
3825 | 3825 |
3826 | 3826 |
| 3827 void LCodeGen::DoMathFround(LMathFround* instr) { |
| 3828 DoubleRegister input = ToDoubleRegister(instr->value()); |
| 3829 DoubleRegister result = ToDoubleRegister(instr->result()); |
| 3830 __ cvt_s_d(result.low(), input); |
| 3831 __ cvt_d_s(result, result.low()); |
| 3832 } |
| 3833 |
| 3834 |
3827 void LCodeGen::DoMathSqrt(LMathSqrt* instr) { | 3835 void LCodeGen::DoMathSqrt(LMathSqrt* instr) { |
3828 DoubleRegister input = ToDoubleRegister(instr->value()); | 3836 DoubleRegister input = ToDoubleRegister(instr->value()); |
3829 DoubleRegister result = ToDoubleRegister(instr->result()); | 3837 DoubleRegister result = ToDoubleRegister(instr->result()); |
3830 __ sqrt_d(result, input); | 3838 __ sqrt_d(result, input); |
3831 } | 3839 } |
3832 | 3840 |
3833 | 3841 |
3834 void LCodeGen::DoMathPowHalf(LMathPowHalf* instr) { | 3842 void LCodeGen::DoMathPowHalf(LMathPowHalf* instr) { |
3835 DoubleRegister input = ToDoubleRegister(instr->value()); | 3843 DoubleRegister input = ToDoubleRegister(instr->value()); |
3836 DoubleRegister result = ToDoubleRegister(instr->result()); | 3844 DoubleRegister result = ToDoubleRegister(instr->result()); |
(...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5904 __ li(at, scope_info); | 5912 __ li(at, scope_info); |
5905 __ Push(at, ToRegister(instr->function())); | 5913 __ Push(at, ToRegister(instr->function())); |
5906 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5914 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5907 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5915 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5908 } | 5916 } |
5909 | 5917 |
5910 | 5918 |
5911 #undef __ | 5919 #undef __ |
5912 | 5920 |
5913 } } // namespace v8::internal | 5921 } } // namespace v8::internal |
OLD | NEW |