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

Side by Side Diff: src/assembler-arm.h

Issue 13290: Fixed bug in large switch tables on arm. (Closed)
Patch Set: Addressed review comments Created 12 years 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 | « no previous file | src/codegen-arm.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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 void instr_at_put(int pos, Instr instr) { 665 void instr_at_put(int pos, Instr instr) {
666 *reinterpret_cast<Instr*>(buffer_ + pos) = instr; 666 *reinterpret_cast<Instr*>(buffer_ + pos) = instr;
667 } 667 }
668 668
669 // Decode branch instruction at pos and return branch target pos 669 // Decode branch instruction at pos and return branch target pos
670 int target_at(int pos); 670 int target_at(int pos);
671 671
672 // Patch branch instruction at pos to branch to given branch target pos 672 // Patch branch instruction at pos to branch to given branch target pos
673 void target_at_put(int pos, int target_pos); 673 void target_at_put(int pos, int target_pos);
674 674
675 // Check if is time to emit a constant pool for pending reloc info entries
676 void CheckConstPool(bool force_emit, bool require_jump);
677
678 // Block the emission of the constant pool before pc_offset
679 void BlockConstPoolBefore(int pc_offset) {
680 if (no_const_pool_before_ < pc_offset) no_const_pool_before_ = pc_offset;
681 }
682
675 private: 683 private:
676 // Code buffer: 684 // Code buffer:
677 // The buffer into which code and relocation info are generated. 685 // The buffer into which code and relocation info are generated.
678 byte* buffer_; 686 byte* buffer_;
679 int buffer_size_; 687 int buffer_size_;
680 // True if the assembler owns the buffer, false if buffer is external. 688 // True if the assembler owns the buffer, false if buffer is external.
681 bool own_buffer_; 689 bool own_buffer_;
682 690
683 // Buffer size and constant pool distance are checked together at regular 691 // Buffer size and constant pool distance are checked together at regular
684 // intervals of kBufferCheckInterval emitted bytes 692 // intervals of kBufferCheckInterval emitted bytes
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 void addrmod5(Instr instr, CRegister crd, const MemOperand& x); 770 void addrmod5(Instr instr, CRegister crd, const MemOperand& x);
763 771
764 // Labels 772 // Labels
765 void print(Label* L); 773 void print(Label* L);
766 void bind_to(Label* L, int pos); 774 void bind_to(Label* L, int pos);
767 void link_to(Label* L, Label* appendix); 775 void link_to(Label* L, Label* appendix);
768 void next(Label* L); 776 void next(Label* L);
769 777
770 // Record reloc info for current pc_ 778 // Record reloc info for current pc_
771 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); 779 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0);
772
773 // Check if is time to emit a constant pool for pending reloc info entries
774 void CheckConstPool(bool force_emit, bool require_jump);
775
776 // Block the emission of the constant pool before pc_offset
777 void BlockConstPoolBefore(int pc_offset) {
778 if (no_const_pool_before_ < pc_offset) no_const_pool_before_ = pc_offset;
779 }
780 }; 780 };
781 781
782 } } // namespace v8::internal 782 } } // namespace v8::internal
783 783
784 #endif // V8_ASSEMBLER_ARM_H_ 784 #endif // V8_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698