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