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

Side by Side Diff: src/ppc/assembler-ppc.cc

Issue 1259723002: PPC: Support for conditional return instruction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « src/ppc/assembler-ppc.h ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 L->link_to(pc_offset()); 677 L->link_to(pc_offset());
678 } 678 }
679 679
680 return position; 680 return position;
681 } 681 }
682 682
683 683
684 // Branch instructions. 684 // Branch instructions.
685 685
686 686
687 void Assembler::bclr(BOfield bo, LKBit lk) { 687 void Assembler::bclr(BOfield bo, int condition_bit, LKBit lk) {
688 positions_recorder()->WriteRecordedPositions(); 688 positions_recorder()->WriteRecordedPositions();
689 emit(EXT1 | bo | BCLRX | lk); 689 emit(EXT1 | bo | condition_bit * B16 | BCLRX | lk);
690 } 690 }
691 691
692 692
693 void Assembler::bcctr(BOfield bo, LKBit lk) { 693 void Assembler::bcctr(BOfield bo, int condition_bit, LKBit lk) {
694 positions_recorder()->WriteRecordedPositions(); 694 positions_recorder()->WriteRecordedPositions();
695 emit(EXT1 | bo | BCCTRX | lk); 695 emit(EXT1 | bo | condition_bit * B16 | BCCTRX | lk);
696 } 696 }
697 697
698 698
699 // Pseudo op - branch to link register 699 // Pseudo op - branch to link register
700 void Assembler::blr() { bclr(BA, LeaveLK); } 700 void Assembler::blr() { bclr(BA, 0, LeaveLK); }
701 701
702 702
703 // Pseudo op - branch to count register -- used for "jump" 703 // Pseudo op - branch to count register -- used for "jump"
704 void Assembler::bctr() { bcctr(BA, LeaveLK); } 704 void Assembler::bctr() { bcctr(BA, 0, LeaveLK); }
705 705
706 706
707 void Assembler::bctrl() { bcctr(BA, SetLK); } 707 void Assembler::bctrl() { bcctr(BA, 0, SetLK); }
708 708
709 709
710 void Assembler::bc(int branch_offset, BOfield bo, int condition_bit, LKBit lk) { 710 void Assembler::bc(int branch_offset, BOfield bo, int condition_bit, LKBit lk) {
711 if (lk == SetLK) { 711 if (lk == SetLK) {
712 positions_recorder()->WriteRecordedPositions(); 712 positions_recorder()->WriteRecordedPositions();
713 } 713 }
714 int imm16 = branch_offset; 714 int imm16 = branch_offset;
715 CHECK(is_int16(imm16) && (imm16 & (kAAMask | kLKMask)) == 0); 715 CHECK(is_int16(imm16) && (imm16 & (kAAMask | kLKMask)) == 0);
716 emit(BCX | bo | condition_bit * B16 | (imm16 & kImm16Mask) | lk); 716 emit(BCX | bo | condition_bit * B16 | (imm16 & kImm16Mask) | lk);
717 } 717 }
(...skipping 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after
2425 2425
2426 trampoline_ = Trampoline(pc_offset() - size, tracked_branch_count_); 2426 trampoline_ = Trampoline(pc_offset() - size, tracked_branch_count_);
2427 } 2427 }
2428 } 2428 }
2429 2429
2430 2430
2431 } // namespace internal 2431 } // namespace internal
2432 } // namespace v8 2432 } // namespace v8
2433 2433
2434 #endif // V8_TARGET_ARCH_PPC 2434 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/assembler-ppc.h ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698