Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 6591073: ARM: Implement untagged input for TranscendentalCacheStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix lint. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 759 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
760 break; 760 break;
761 } 761 }
762 case CodeStub::StringCompare: { 762 case CodeStub::StringCompare: {
763 StringCompareStub stub; 763 StringCompareStub stub;
764 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 764 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
765 break; 765 break;
766 } 766 }
767 case CodeStub::TranscendentalCache: { 767 case CodeStub::TranscendentalCache: {
768 __ ldr(r0, MemOperand(sp, 0)); 768 __ ldr(r0, MemOperand(sp, 0));
769 TranscendentalCacheStub stub(instr->transcendental_type()); 769 TranscendentalCacheStub stub(instr->transcendental_type(),
770 TranscendentalCacheStub::TAGGED);
770 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 771 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
771 break; 772 break;
772 } 773 }
773 default: 774 default:
774 UNREACHABLE(); 775 UNREACHABLE();
775 } 776 }
776 } 777 }
777 778
778 779
779 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { 780 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) {
(...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after
2693 __ PrepareCallCFunction(4, scratch); 2694 __ PrepareCallCFunction(4, scratch);
2694 __ vmov(r0, r1, ToDoubleRegister(left)); 2695 __ vmov(r0, r1, ToDoubleRegister(left));
2695 __ vmov(r2, r3, result_reg); 2696 __ vmov(r2, r3, result_reg);
2696 __ CallCFunction(ExternalReference::power_double_double_function(), 4); 2697 __ CallCFunction(ExternalReference::power_double_double_function(), 4);
2697 } 2698 }
2698 // Store the result in the result register. 2699 // Store the result in the result register.
2699 __ GetCFunctionDoubleResult(result_reg); 2700 __ GetCFunctionDoubleResult(result_reg);
2700 } 2701 }
2701 2702
2702 2703
2704 void LCodeGen::DoMathLog(LUnaryMathOperation* instr) {
2705 ASSERT(ToDoubleRegister(instr->result()).is(d2));
2706 TranscendentalCacheStub stub(TranscendentalCache::LOG,
2707 TranscendentalCacheStub::UNTAGGED);
2708 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
2709 }
2710
2711
2712 void LCodeGen::DoMathCos(LUnaryMathOperation* instr) {
2713 ASSERT(ToDoubleRegister(instr->result()).is(d2));
2714 TranscendentalCacheStub stub(TranscendentalCache::COS,
2715 TranscendentalCacheStub::UNTAGGED);
2716 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
2717 }
2718
2719
2720 void LCodeGen::DoMathSin(LUnaryMathOperation* instr) {
2721 ASSERT(ToDoubleRegister(instr->result()).is(d2));
2722 TranscendentalCacheStub stub(TranscendentalCache::SIN,
2723 TranscendentalCacheStub::UNTAGGED);
2724 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
2725 }
2726
2727
2703 void LCodeGen::DoUnaryMathOperation(LUnaryMathOperation* instr) { 2728 void LCodeGen::DoUnaryMathOperation(LUnaryMathOperation* instr) {
2704 switch (instr->op()) { 2729 switch (instr->op()) {
2705 case kMathAbs: 2730 case kMathAbs:
2706 DoMathAbs(instr); 2731 DoMathAbs(instr);
2707 break; 2732 break;
2708 case kMathFloor: 2733 case kMathFloor:
2709 DoMathFloor(instr); 2734 DoMathFloor(instr);
2710 break; 2735 break;
2711 case kMathRound: 2736 case kMathRound:
2712 DoMathRound(instr); 2737 DoMathRound(instr);
2713 break; 2738 break;
2714 case kMathSqrt: 2739 case kMathSqrt:
2715 DoMathSqrt(instr); 2740 DoMathSqrt(instr);
2716 break; 2741 break;
2742 case kMathCos:
2743 DoMathCos(instr);
2744 break;
2745 case kMathSin:
2746 DoMathSin(instr);
2747 break;
2748 case kMathLog:
2749 DoMathLog(instr);
2750 break;
2717 default: 2751 default:
2718 Abort("Unimplemented type of LUnaryMathOperation."); 2752 Abort("Unimplemented type of LUnaryMathOperation.");
2719 UNREACHABLE(); 2753 UNREACHABLE();
2720 } 2754 }
2721 } 2755 }
2722 2756
2723 2757
2724 void LCodeGen::DoCallKeyed(LCallKeyed* instr) { 2758 void LCodeGen::DoCallKeyed(LCallKeyed* instr) {
2725 ASSERT(ToRegister(instr->result()).is(r0)); 2759 ASSERT(ToRegister(instr->result()).is(r0));
2726 2760
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
3813 ASSERT(!environment->HasBeenRegistered()); 3847 ASSERT(!environment->HasBeenRegistered());
3814 RegisterEnvironmentForDeoptimization(environment); 3848 RegisterEnvironmentForDeoptimization(environment);
3815 ASSERT(osr_pc_offset_ == -1); 3849 ASSERT(osr_pc_offset_ == -1);
3816 osr_pc_offset_ = masm()->pc_offset(); 3850 osr_pc_offset_ = masm()->pc_offset();
3817 } 3851 }
3818 3852
3819 3853
3820 #undef __ 3854 #undef __
3821 3855
3822 } } // namespace v8::internal 3856 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698