OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 758 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
759 break; | 759 break; |
760 } | 760 } |
761 case CodeStub::StringCompare: { | 761 case CodeStub::StringCompare: { |
762 StringCompareStub stub; | 762 StringCompareStub stub; |
763 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 763 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
764 break; | 764 break; |
765 } | 765 } |
766 case CodeStub::TranscendentalCache: { | 766 case CodeStub::TranscendentalCache: { |
767 __ ldr(r0, MemOperand(sp, 0)); | 767 __ ldr(r0, MemOperand(sp, 0)); |
768 TranscendentalCacheStub stub(instr->transcendental_type()); | 768 TranscendentalCacheStub stub(instr->transcendental_type(), |
| 769 TranscendentalCacheStub::TAGGED); |
769 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 770 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
770 break; | 771 break; |
771 } | 772 } |
772 default: | 773 default: |
773 UNREACHABLE(); | 774 UNREACHABLE(); |
774 } | 775 } |
775 } | 776 } |
776 | 777 |
777 | 778 |
778 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { | 779 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { |
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2731 __ PrepareCallCFunction(4, scratch); | 2732 __ PrepareCallCFunction(4, scratch); |
2732 __ vmov(r0, r1, ToDoubleRegister(left)); | 2733 __ vmov(r0, r1, ToDoubleRegister(left)); |
2733 __ vmov(r2, r3, result_reg); | 2734 __ vmov(r2, r3, result_reg); |
2734 __ CallCFunction(ExternalReference::power_double_double_function(), 4); | 2735 __ CallCFunction(ExternalReference::power_double_double_function(), 4); |
2735 } | 2736 } |
2736 // Store the result in the result register. | 2737 // Store the result in the result register. |
2737 __ GetCFunctionDoubleResult(result_reg); | 2738 __ GetCFunctionDoubleResult(result_reg); |
2738 } | 2739 } |
2739 | 2740 |
2740 | 2741 |
| 2742 void LCodeGen::DoMathLog(LUnaryMathOperation* instr) { |
| 2743 ASSERT(ToDoubleRegister(instr->result()).is(d2)); |
| 2744 TranscendentalCacheStub stub(TranscendentalCache::LOG, |
| 2745 TranscendentalCacheStub::UNTAGGED); |
| 2746 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 2747 } |
| 2748 |
| 2749 |
| 2750 void LCodeGen::DoMathCos(LUnaryMathOperation* instr) { |
| 2751 ASSERT(ToDoubleRegister(instr->result()).is(d2)); |
| 2752 TranscendentalCacheStub stub(TranscendentalCache::COS, |
| 2753 TranscendentalCacheStub::UNTAGGED); |
| 2754 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 2755 } |
| 2756 |
| 2757 |
| 2758 void LCodeGen::DoMathSin(LUnaryMathOperation* instr) { |
| 2759 ASSERT(ToDoubleRegister(instr->result()).is(d2)); |
| 2760 TranscendentalCacheStub stub(TranscendentalCache::SIN, |
| 2761 TranscendentalCacheStub::UNTAGGED); |
| 2762 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 2763 } |
| 2764 |
| 2765 |
2741 void LCodeGen::DoUnaryMathOperation(LUnaryMathOperation* instr) { | 2766 void LCodeGen::DoUnaryMathOperation(LUnaryMathOperation* instr) { |
2742 switch (instr->op()) { | 2767 switch (instr->op()) { |
2743 case kMathAbs: | 2768 case kMathAbs: |
2744 DoMathAbs(instr); | 2769 DoMathAbs(instr); |
2745 break; | 2770 break; |
2746 case kMathFloor: | 2771 case kMathFloor: |
2747 DoMathFloor(instr); | 2772 DoMathFloor(instr); |
2748 break; | 2773 break; |
2749 case kMathRound: | 2774 case kMathRound: |
2750 DoMathRound(instr); | 2775 DoMathRound(instr); |
2751 break; | 2776 break; |
2752 case kMathSqrt: | 2777 case kMathSqrt: |
2753 DoMathSqrt(instr); | 2778 DoMathSqrt(instr); |
2754 break; | 2779 break; |
| 2780 case kMathCos: |
| 2781 DoMathCos(instr); |
| 2782 break; |
| 2783 case kMathSin: |
| 2784 DoMathSin(instr); |
| 2785 break; |
| 2786 case kMathLog: |
| 2787 DoMathLog(instr); |
| 2788 break; |
2755 default: | 2789 default: |
2756 Abort("Unimplemented type of LUnaryMathOperation."); | 2790 Abort("Unimplemented type of LUnaryMathOperation."); |
2757 UNREACHABLE(); | 2791 UNREACHABLE(); |
2758 } | 2792 } |
2759 } | 2793 } |
2760 | 2794 |
2761 | 2795 |
2762 void LCodeGen::DoCallKeyed(LCallKeyed* instr) { | 2796 void LCodeGen::DoCallKeyed(LCallKeyed* instr) { |
2763 ASSERT(ToRegister(instr->result()).is(r0)); | 2797 ASSERT(ToRegister(instr->result()).is(r0)); |
2764 | 2798 |
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3848 ASSERT(!environment->HasBeenRegistered()); | 3882 ASSERT(!environment->HasBeenRegistered()); |
3849 RegisterEnvironmentForDeoptimization(environment); | 3883 RegisterEnvironmentForDeoptimization(environment); |
3850 ASSERT(osr_pc_offset_ == -1); | 3884 ASSERT(osr_pc_offset_ == -1); |
3851 osr_pc_offset_ = masm()->pc_offset(); | 3885 osr_pc_offset_ = masm()->pc_offset(); |
3852 } | 3886 } |
3853 | 3887 |
3854 | 3888 |
3855 #undef __ | 3889 #undef __ |
3856 | 3890 |
3857 } } // namespace v8::internal | 3891 } } // namespace v8::internal |
OLD | NEW |