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

Side by Side Diff: src/arm/ic-arm.cc

Issue 16203004: Fix LoadIC calling convention on ARM (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 __ bind(&miss); 644 __ bind(&miss);
645 GenerateMiss(masm, argc); 645 GenerateMiss(masm, argc);
646 } 646 }
647 647
648 648
649 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 649 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
650 // ----------- S t a t e ------------- 650 // ----------- S t a t e -------------
651 // -- r2 : name 651 // -- r2 : name
652 // -- lr : return address 652 // -- lr : return address
653 // -- r0 : receiver 653 // -- r0 : receiver
654 // -- sp[0] : receiver
655 // ----------------------------------- 654 // -----------------------------------
656 655
657 // Probe the stub cache. 656 // Probe the stub cache.
658 Code::Flags flags = Code::ComputeFlags( 657 Code::Flags flags = Code::ComputeFlags(
659 Code::STUB, MONOMORPHIC, Code::kNoExtraICState, 658 Code::STUB, MONOMORPHIC, Code::kNoExtraICState,
660 Code::NORMAL, Code::LOAD_IC); 659 Code::NORMAL, Code::LOAD_IC);
661 Isolate::Current()->stub_cache()->GenerateProbe( 660 Isolate::Current()->stub_cache()->GenerateProbe(
662 masm, flags, r0, r2, r3, r4, r5, r6); 661 masm, flags, r0, r2, r3, r4, r5, r6);
663 662
664 // Cache miss: Jump to runtime. 663 // Cache miss: Jump to runtime.
665 GenerateMiss(masm); 664 GenerateMiss(masm);
666 } 665 }
667 666
668 667
669 void LoadIC::GenerateNormal(MacroAssembler* masm) { 668 void LoadIC::GenerateNormal(MacroAssembler* masm) {
670 // ----------- S t a t e ------------- 669 // ----------- S t a t e -------------
671 // -- r2 : name 670 // -- r2 : name
672 // -- lr : return address 671 // -- lr : return address
673 // -- r0 : receiver 672 // -- r0 : receiver
674 // -- sp[0] : receiver
675 // ----------------------------------- 673 // -----------------------------------
676 Label miss; 674 Label miss;
677 675
678 GenerateNameDictionaryReceiverCheck(masm, r0, r1, r3, r4, &miss); 676 GenerateNameDictionaryReceiverCheck(masm, r0, r1, r3, r4, &miss);
679 677
680 // r1: elements 678 // r1: elements
681 GenerateDictionaryLoad(masm, &miss, r1, r2, r0, r3, r4); 679 GenerateDictionaryLoad(masm, &miss, r1, r2, r0, r3, r4);
682 __ Ret(); 680 __ Ret();
683 681
684 // Cache miss: Jump to runtime. 682 // Cache miss: Jump to runtime.
685 __ bind(&miss); 683 __ bind(&miss);
686 GenerateMiss(masm); 684 GenerateMiss(masm);
687 } 685 }
688 686
689 687
690 void LoadIC::GenerateMiss(MacroAssembler* masm) { 688 void LoadIC::GenerateMiss(MacroAssembler* masm) {
691 // ----------- S t a t e ------------- 689 // ----------- S t a t e -------------
692 // -- r2 : name 690 // -- r2 : name
693 // -- lr : return address 691 // -- lr : return address
694 // -- r0 : receiver 692 // -- r0 : receiver
695 // -- sp[0] : receiver
696 // ----------------------------------- 693 // -----------------------------------
697 Isolate* isolate = masm->isolate(); 694 Isolate* isolate = masm->isolate();
698 695
699 __ IncrementCounter(isolate->counters()->load_miss(), 1, r3, r4); 696 __ IncrementCounter(isolate->counters()->load_miss(), 1, r3, r4);
700 697
701 __ mov(r3, r0); 698 __ mov(r3, r0);
702 __ Push(r3, r2); 699 __ Push(r3, r2);
703 700
704 // Perform tail call to the entry. 701 // Perform tail call to the entry.
705 ExternalReference ref = 702 ExternalReference ref =
706 ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 703 ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
707 __ TailCallExternalReference(ref, 2, 1); 704 __ TailCallExternalReference(ref, 2, 1);
708 } 705 }
709 706
710 707
711 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 708 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
712 // ---------- S t a t e -------------- 709 // ---------- S t a t e --------------
713 // -- r2 : name 710 // -- r2 : name
714 // -- lr : return address 711 // -- lr : return address
715 // -- r0 : receiver 712 // -- r0 : receiver
716 // -- sp[0] : receiver
717 // ----------------------------------- 713 // -----------------------------------
718 714
719 __ mov(r3, r0); 715 __ mov(r3, r0);
720 __ Push(r3, r2); 716 __ Push(r3, r2);
721 717
722 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); 718 __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
723 } 719 }
724 720
725 721
726 static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm, 722 static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm,
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 } else { 1696 } else {
1701 ASSERT(Assembler::GetCondition(branch_instr) == ne); 1697 ASSERT(Assembler::GetCondition(branch_instr) == ne);
1702 patcher.EmitCondition(eq); 1698 patcher.EmitCondition(eq);
1703 } 1699 }
1704 } 1700 }
1705 1701
1706 1702
1707 } } // namespace v8::internal 1703 } } // namespace v8::internal
1708 1704
1709 #endif // V8_TARGET_ARCH_ARM 1705 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698