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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 | 773 |
774 // Returns the branch offset to the given label from the current code position | 774 // Returns the branch offset to the given label from the current code position |
775 // Links the label to the current position if it is still unbound | 775 // Links the label to the current position if it is still unbound |
776 // Manages the jump elimination optimization if the second parameter is true. | 776 // Manages the jump elimination optimization if the second parameter is true. |
777 int branch_offset(Label* L, bool jump_elimination_allowed); | 777 int branch_offset(Label* L, bool jump_elimination_allowed); |
778 | 778 |
779 // Return the address in the constant pool of the code target address used by | 779 // Return the address in the constant pool of the code target address used by |
780 // the branch/call instruction at pc, or the object in a mov. | 780 // the branch/call instruction at pc, or the object in a mov. |
781 INLINE(static Address target_pointer_address_at(Address pc)); | 781 INLINE(static Address target_pointer_address_at(Address pc)); |
782 | 782 |
783 // Return the address in the constant pool of the code target address used by | |
784 // the branch/call instruction at pc, or the object in a mov. | |
785 INLINE(static Address target_constant_pool_address_at( | |
786 Address pc, ConstantPoolArray* constant_pool)); | |
787 | |
788 // Read/Modify the code target address in the branch/call instruction at pc. | 783 // Read/Modify the code target address in the branch/call instruction at pc. |
789 INLINE(static Address target_address_at(Address pc, | 784 INLINE(static Address target_address_at(Address pc)); |
790 ConstantPoolArray* constant_pool)); | 785 INLINE(static void set_target_address_at(Address pc, Address target)); |
791 INLINE(static void set_target_address_at(Address pc, | |
792 ConstantPoolArray* constant_pool, | |
793 Address target)); | |
794 INLINE(static Address target_address_at(Address pc, Code* code)) { | |
795 ConstantPoolArray* constant_pool = code ? code->constant_pool() : NULL; | |
796 return target_address_at(pc, constant_pool); | |
797 } | |
798 INLINE(static void set_target_address_at(Address pc, | |
799 Code* code, | |
800 Address target)) { | |
801 ConstantPoolArray* constant_pool = code ? code->constant_pool() : NULL; | |
802 set_target_address_at(pc, constant_pool, target); | |
803 } | |
804 | 786 |
805 // Return the code target address at a call site from the return address | 787 // Return the code target address at a call site from the return address |
806 // of that call in the instruction stream. | 788 // of that call in the instruction stream. |
807 INLINE(static Address target_address_from_return_address(Address pc)); | 789 INLINE(static Address target_address_from_return_address(Address pc)); |
808 | 790 |
809 // Given the address of the beginning of a call, return the address | 791 // Given the address of the beginning of a call, return the address |
810 // in the instruction stream that the call will return from. | 792 // in the instruction stream that the call will return from. |
811 INLINE(static Address return_address_from_call_start(Address pc)); | 793 INLINE(static Address return_address_from_call_start(Address pc)); |
812 | 794 |
813 // This sets the branch destination (which is in the constant pool on ARM). | 795 // This sets the branch destination (which is in the constant pool on ARM). |
814 // This is for calls and branches within generated code. | 796 // This is for calls and branches within generated code. |
815 inline static void deserialization_set_special_target_at( | 797 inline static void deserialization_set_special_target_at( |
816 Address constant_pool_entry, Code* code, Address target); | 798 Address constant_pool_entry, Address target); |
817 | 799 |
818 // Here we are patching the address in the constant pool, not the actual call | 800 // Here we are patching the address in the constant pool, not the actual call |
819 // instruction. The address in the constant pool is the same size as a | 801 // instruction. The address in the constant pool is the same size as a |
820 // pointer. | 802 // pointer. |
821 static const int kSpecialTargetSize = kPointerSize; | 803 static const int kSpecialTargetSize = kPointerSize; |
822 | 804 |
823 // Size of an instruction. | 805 // Size of an instruction. |
824 static const int kInstrSize = sizeof(Instr); | 806 static const int kInstrSize = sizeof(Instr); |
825 | 807 |
826 // Distance between start of patched return sequence and the emitted address | 808 // Distance between start of patched return sequence and the emitted address |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1618 public: | 1600 public: |
1619 explicit EnsureSpace(Assembler* assembler) { | 1601 explicit EnsureSpace(Assembler* assembler) { |
1620 assembler->CheckBuffer(); | 1602 assembler->CheckBuffer(); |
1621 } | 1603 } |
1622 }; | 1604 }; |
1623 | 1605 |
1624 | 1606 |
1625 } } // namespace v8::internal | 1607 } } // namespace v8::internal |
1626 | 1608 |
1627 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1609 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |