| OLD | NEW |
| 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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 | 638 |
| 639 // Record a comment relocation entry that can be used by a disassembler. | 639 // Record a comment relocation entry that can be used by a disassembler. |
| 640 // Use --debug_code to enable. | 640 // Use --debug_code to enable. |
| 641 void RecordComment(const char* msg); | 641 void RecordComment(const char* msg); |
| 642 | 642 |
| 643 void RecordPosition(int pos); | 643 void RecordPosition(int pos); |
| 644 void RecordStatementPosition(int pos); | 644 void RecordStatementPosition(int pos); |
| 645 | 645 |
| 646 int pc_offset() const { return pc_ - buffer_; } | 646 int pc_offset() const { return pc_ - buffer_; } |
| 647 int last_position() const { return last_position_; } | 647 int last_position() const { return last_position_; } |
| 648 bool last_position_is_statement() const { | 648 int last_statement_position() const { return last_statement_position_; } |
| 649 return last_position_is_statement_; | |
| 650 } | |
| 651 | 649 |
| 652 protected: | 650 protected: |
| 653 int buffer_space() const { return reloc_info_writer.pos() - pc_; } | 651 int buffer_space() const { return reloc_info_writer.pos() - pc_; } |
| 654 | 652 |
| 655 // Read/patch instructions | 653 // Read/patch instructions |
| 656 Instr instr_at(byte* pc) { return *reinterpret_cast<Instr*>(pc); } | 654 Instr instr_at(byte* pc) { return *reinterpret_cast<Instr*>(pc); } |
| 657 void instr_at_put(byte* pc, Instr instr) { | 655 void instr_at_put(byte* pc, Instr instr) { |
| 658 *reinterpret_cast<Instr*>(pc) = instr; | 656 *reinterpret_cast<Instr*>(pc) = instr; |
| 659 } | 657 } |
| 660 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } | 658 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 | 738 |
| 741 // Jump-to-jump elimination: | 739 // Jump-to-jump elimination: |
| 742 // The last label to be bound to _binding_pos, if unbound. | 740 // The last label to be bound to _binding_pos, if unbound. |
| 743 Label unbound_label_; | 741 Label unbound_label_; |
| 744 // The position to which _unbound_label has to be bound, if present. | 742 // The position to which _unbound_label has to be bound, if present. |
| 745 int binding_pos_; | 743 int binding_pos_; |
| 746 // The position before which jumps cannot be eliminated. | 744 // The position before which jumps cannot be eliminated. |
| 747 int last_bound_pos_; | 745 int last_bound_pos_; |
| 748 | 746 |
| 749 // source position information | 747 // source position information |
| 748 int last_statement_position_; |
| 750 int last_position_; | 749 int last_position_; |
| 751 bool last_position_is_statement_; | |
| 752 | 750 |
| 753 // Code emission | 751 // Code emission |
| 754 inline void CheckBuffer(); | 752 inline void CheckBuffer(); |
| 755 void GrowBuffer(); | 753 void GrowBuffer(); |
| 756 inline void emit(Instr x); | 754 inline void emit(Instr x); |
| 757 | 755 |
| 758 // Instruction generation | 756 // Instruction generation |
| 759 void addrmod1(Instr instr, Register rn, Register rd, const Operand& x); | 757 void addrmod1(Instr instr, Register rn, Register rd, const Operand& x); |
| 760 void addrmod2(Instr instr, Register rd, const MemOperand& x); | 758 void addrmod2(Instr instr, Register rd, const MemOperand& x); |
| 761 void addrmod3(Instr instr, Register rd, const MemOperand& x); | 759 void addrmod3(Instr instr, Register rd, const MemOperand& x); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 776 | 774 |
| 777 // Block the emission of the constant pool before pc_offset | 775 // Block the emission of the constant pool before pc_offset |
| 778 void BlockConstPoolBefore(int pc_offset) { | 776 void BlockConstPoolBefore(int pc_offset) { |
| 779 if (no_const_pool_before_ < pc_offset) no_const_pool_before_ = pc_offset; | 777 if (no_const_pool_before_ < pc_offset) no_const_pool_before_ = pc_offset; |
| 780 } | 778 } |
| 781 }; | 779 }; |
| 782 | 780 |
| 783 } } // namespace v8::internal | 781 } } // namespace v8::internal |
| 784 | 782 |
| 785 #endif // V8_ASSEMBLER_ARM_H_ | 783 #endif // V8_ASSEMBLER_ARM_H_ |
| OLD | NEW |