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

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

Issue 2072963003: Simplify AssemblerPositionsRecorder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comment Created 4 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
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/ppc/macro-assembler-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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 } 725 }
726 726
727 return position; 727 return position;
728 } 728 }
729 729
730 730
731 // Branch instructions. 731 // Branch instructions.
732 732
733 733
734 void Assembler::bclr(BOfield bo, int condition_bit, LKBit lk) { 734 void Assembler::bclr(BOfield bo, int condition_bit, LKBit lk) {
735 positions_recorder()->WriteRecordedPositions();
736 emit(EXT1 | bo | condition_bit * B16 | BCLRX | lk); 735 emit(EXT1 | bo | condition_bit * B16 | BCLRX | lk);
737 } 736 }
738 737
739 738
740 void Assembler::bcctr(BOfield bo, int condition_bit, LKBit lk) { 739 void Assembler::bcctr(BOfield bo, int condition_bit, LKBit lk) {
741 positions_recorder()->WriteRecordedPositions();
742 emit(EXT1 | bo | condition_bit * B16 | BCCTRX | lk); 740 emit(EXT1 | bo | condition_bit * B16 | BCCTRX | lk);
743 } 741 }
744 742
745 743
746 // Pseudo op - branch to link register 744 // Pseudo op - branch to link register
747 void Assembler::blr() { bclr(BA, 0, LeaveLK); } 745 void Assembler::blr() { bclr(BA, 0, LeaveLK); }
748 746
749 747
750 // Pseudo op - branch to count register -- used for "jump" 748 // Pseudo op - branch to count register -- used for "jump"
751 void Assembler::bctr() { bcctr(BA, 0, LeaveLK); } 749 void Assembler::bctr() { bcctr(BA, 0, LeaveLK); }
752 750
753 751
754 void Assembler::bctrl() { bcctr(BA, 0, SetLK); } 752 void Assembler::bctrl() { bcctr(BA, 0, SetLK); }
755 753
756 754
757 void Assembler::bc(int branch_offset, BOfield bo, int condition_bit, LKBit lk) { 755 void Assembler::bc(int branch_offset, BOfield bo, int condition_bit, LKBit lk) {
758 if (lk == SetLK) {
759 positions_recorder()->WriteRecordedPositions();
760 }
761 int imm16 = branch_offset; 756 int imm16 = branch_offset;
762 CHECK(is_int16(imm16) && (imm16 & (kAAMask | kLKMask)) == 0); 757 CHECK(is_int16(imm16) && (imm16 & (kAAMask | kLKMask)) == 0);
763 emit(BCX | bo | condition_bit * B16 | (imm16 & kImm16Mask) | lk); 758 emit(BCX | bo | condition_bit * B16 | (imm16 & kImm16Mask) | lk);
764 } 759 }
765 760
766 761
767 void Assembler::b(int branch_offset, LKBit lk) { 762 void Assembler::b(int branch_offset, LKBit lk) {
768 if (lk == SetLK) {
769 positions_recorder()->WriteRecordedPositions();
770 }
771 int imm26 = branch_offset; 763 int imm26 = branch_offset;
772 CHECK(is_int26(imm26) && (imm26 & (kAAMask | kLKMask)) == 0); 764 CHECK(is_int26(imm26) && (imm26 & (kAAMask | kLKMask)) == 0);
773 emit(BX | (imm26 & kImm26Mask) | lk); 765 emit(BX | (imm26 & kImm26Mask) | lk);
774 } 766 }
775 767
776 768
777 void Assembler::xori(Register dst, Register src, const Operand& imm) { 769 void Assembler::xori(Register dst, Register src, const Operand& imm) {
778 d_form(XORI, src, dst, imm.imm_, false); 770 d_form(XORI, src, dst, imm.imm_, false);
779 } 771 }
780 772
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after
2538 2530
2539 trampoline_ = Trampoline(pc_offset() - size, tracked_branch_count_); 2531 trampoline_ = Trampoline(pc_offset() - size, tracked_branch_count_);
2540 } 2532 }
2541 } 2533 }
2542 2534
2543 2535
2544 } // namespace internal 2536 } // namespace internal
2545 } // namespace v8 2537 } // namespace v8
2546 2538
2547 #endif // V8_TARGET_ARCH_PPC 2539 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/ppc/macro-assembler-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698