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

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

Issue 159402: Make X64 implementation update Store ic stubs. Remove comment that talks abo... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 void KeyedLoadIC::Generate(MacroAssembler* masm, 176 void KeyedLoadIC::Generate(MacroAssembler* masm,
177 ExternalReference const& f) { 177 ExternalReference const& f) {
178 // ----------- S t a t e ------------- 178 // ----------- S t a t e -------------
179 // -- rsp[0] : return address 179 // -- rsp[0] : return address
180 // -- rsp[8] : name 180 // -- rsp[8] : name
181 // -- rsp[16] : receiver 181 // -- rsp[16] : receiver
182 // ----------------------------------- 182 // -----------------------------------
183 183
184 __ movq(rax, Operand(rsp, kPointerSize)); 184 __ movq(rax, Operand(rsp, kPointerSize));
185 __ movq(rcx, Operand(rsp, 2 * kPointerSize)); 185 __ movq(rcx, Operand(rsp, 2 * kPointerSize));
186
187 // Move the return address below the arguments.
188 __ pop(rbx); 186 __ pop(rbx);
189 __ push(rcx); 187 __ push(rcx); // receiver
190 __ push(rax); 188 __ push(rax); // name
191 __ push(rbx); 189 __ push(rbx); // return address
192 190
193 // Perform tail call to the entry. 191 // Perform tail call to the entry.
194 __ TailCallRuntime(f, 2); 192 __ TailCallRuntime(f, 2);
195 } 193 }
196 194
197 195
198 #ifdef DEBUG 196 #ifdef DEBUG
199 // For use in assert below. 197 // For use in assert below.
200 static int TenToThe(int exponent) { 198 static int TenToThe(int exponent) {
201 ASSERT(exponent <= 9); 199 ASSERT(exponent <= 9);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 } 360 }
363 361
364 void KeyedStoreIC::Generate(MacroAssembler* masm, ExternalReference const& f) { 362 void KeyedStoreIC::Generate(MacroAssembler* masm, ExternalReference const& f) {
365 // ----------- S t a t e ------------- 363 // ----------- S t a t e -------------
366 // -- rax : value 364 // -- rax : value
367 // -- rsp[0] : return address 365 // -- rsp[0] : return address
368 // -- rsp[8] : key 366 // -- rsp[8] : key
369 // -- rsp[16] : receiver 367 // -- rsp[16] : receiver
370 // ----------------------------------- 368 // -----------------------------------
371 369
372 // Move the return address below the arguments.
373 __ pop(rcx); 370 __ pop(rcx);
374 __ push(Operand(rsp, 1 * kPointerSize)); 371 __ push(Operand(rsp, 1 * kPointerSize)); // receiver
375 __ push(Operand(rsp, 1 * kPointerSize)); 372 __ push(Operand(rsp, 1 * kPointerSize)); // key
376 __ push(rax); 373 __ push(rax); // value
377 __ push(rcx); 374 __ push(rcx); // return address
378 375
379 // Do tail-call to runtime routine. 376 // Do tail-call to runtime routine.
380 __ TailCallRuntime(f, 3); 377 __ TailCallRuntime(f, 3);
381 } 378 }
382 379
383 void KeyedStoreIC::GenerateExtendStorage(MacroAssembler* masm) { 380 void KeyedStoreIC::GenerateExtendStorage(MacroAssembler* masm) {
384 Generate(masm, ExternalReference(IC_Utility(kKeyedStoreIC_Miss))); 381 __ int3();
382 __ movq(rax, Immediate(0xdead1234));
385 } 383 }
386 384
387 385
388 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { 386 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) {
389 // ----------- S t a t e ------------- 387 // ----------- S t a t e -------------
390 // -- rax : value 388 // -- rax : value
391 // -- rsp[0] : return address 389 // -- rsp[0] : return address
392 // -- rsp[8] : key 390 // -- rsp[8] : key
393 // -- rsp[16] : receiver 391 // -- rsp[16] : receiver
394 // ----------------------------------- 392 // -----------------------------------
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 575
578 void LoadIC::Generate(MacroAssembler* masm, ExternalReference const& f) { 576 void LoadIC::Generate(MacroAssembler* masm, ExternalReference const& f) {
579 // ----------- S t a t e ------------- 577 // ----------- S t a t e -------------
580 // -- rcx : name 578 // -- rcx : name
581 // -- rsp[0] : return address 579 // -- rsp[0] : return address
582 // -- rsp[8] : receiver 580 // -- rsp[8] : receiver
583 // ----------------------------------- 581 // -----------------------------------
584 582
585 __ movq(rax, Operand(rsp, kPointerSize)); 583 __ movq(rax, Operand(rsp, kPointerSize));
586 584
587 // Move the return address below the arguments.
588 __ pop(rbx); 585 __ pop(rbx);
589 __ push(rax); 586 __ push(rax); // receiver
590 __ push(rcx); 587 __ push(rcx); // name
591 __ push(rbx); 588 __ push(rbx); // return address
592 589
593 // Perform tail call to the entry. 590 // Perform tail call to the entry.
594 __ TailCallRuntime(f, 2); 591 __ TailCallRuntime(f, 2);
595 } 592 }
596 593
597 594
598 void LoadIC::GenerateArrayLength(MacroAssembler* masm) { 595 void LoadIC::GenerateArrayLength(MacroAssembler* masm) {
599 Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss))); 596 Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
600 } 597 }
601 598
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 return false; 644 return false;
648 } 645 }
649 646
650 void StoreIC::Generate(MacroAssembler* masm, ExternalReference const& f) { 647 void StoreIC::Generate(MacroAssembler* masm, ExternalReference const& f) {
651 // ----------- S t a t e ------------- 648 // ----------- S t a t e -------------
652 // -- rax : value 649 // -- rax : value
653 // -- rcx : name 650 // -- rcx : name
654 // -- rsp[0] : return address 651 // -- rsp[0] : return address
655 // -- rsp[8] : receiver 652 // -- rsp[8] : receiver
656 // ----------------------------------- 653 // -----------------------------------
657 // Move the return address below the arguments.
658 __ pop(rbx); 654 __ pop(rbx);
659 __ push(Operand(rsp, 0)); 655 __ push(Operand(rsp, 0)); // receiver
660 __ push(rcx); 656 __ push(rcx); // name
661 __ push(rax); 657 __ push(rax); // value
662 __ push(rbx); 658 __ push(rbx); // return address
663 659
664 // Perform tail call to the entry. 660 // Perform tail call to the entry.
665 __ TailCallRuntime(f, 3); 661 __ TailCallRuntime(f, 3);
666 } 662 }
667 663
668 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) { 664 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) {
669 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); 665 // ----------- S t a t e -------------
666 // -- rax : value
667 // -- rcx : Map (target of map transition)
668 // -- rsp[0] : return address
669 // -- rsp[8] : receiver
670 // -----------------------------------
671
672 __ pop(rbx);
673 __ push(Operand(rsp, 0)); // receiver
674 __ push(rcx); // transition map
675 __ push(rax); // value
676 __ push(rbx); // return address
677
678 // Perform tail call to the entry.
679 __ TailCallRuntime(
680 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3);
670 } 681 }
671 682
672 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 683 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
673 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); 684 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss)));
674 } 685 }
675 686
676 687
677 #undef __ 688 #undef __
678 689
679 690
680 } } // namespace v8::internal 691 } } // namespace v8::internal
OLDNEW
« src/ia32/ic-ia32.cc ('K') | « src/ic.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698