| 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 INLINE(static bool is_constant_pool_load(Address pc)); | 664 INLINE(static bool is_constant_pool_load(Address pc)); |
| 665 | 665 |
| 666 // Return the address in the constant pool of the code target address used by | 666 // Return the address in the constant pool of the code target address used by |
| 667 // the branch/call instruction at pc, or the object in a mov. | 667 // the branch/call instruction at pc, or the object in a mov. |
| 668 INLINE(static Address constant_pool_entry_address(Address pc, | 668 INLINE(static Address constant_pool_entry_address(Address pc, |
| 669 Address constant_pool)); | 669 Address constant_pool)); |
| 670 | 670 |
| 671 // Read/Modify the code target address in the branch/call instruction at pc. | 671 // Read/Modify the code target address in the branch/call instruction at pc. |
| 672 INLINE(static Address target_address_at(Address pc, Address constant_pool)); | 672 INLINE(static Address target_address_at(Address pc, Address constant_pool)); |
| 673 INLINE(static void set_target_address_at( | 673 INLINE(static void set_target_address_at( |
| 674 Address pc, Address constant_pool, Address target, | 674 Isolate* isolate, Address pc, Address constant_pool, Address target, |
| 675 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)); | 675 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)); |
| 676 INLINE(static Address target_address_at(Address pc, Code* code)) { | 676 INLINE(static Address target_address_at(Address pc, Code* code)) { |
| 677 Address constant_pool = code ? code->constant_pool() : NULL; | 677 Address constant_pool = code ? code->constant_pool() : NULL; |
| 678 return target_address_at(pc, constant_pool); | 678 return target_address_at(pc, constant_pool); |
| 679 } | 679 } |
| 680 INLINE(static void set_target_address_at(Address pc, | 680 INLINE(static void set_target_address_at( |
| 681 Code* code, | 681 Isolate* isolate, Address pc, Code* code, Address target, |
| 682 Address target, | 682 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)) { |
| 683 ICacheFlushMode icache_flush_mode = | |
| 684 FLUSH_ICACHE_IF_NEEDED)) { | |
| 685 Address constant_pool = code ? code->constant_pool() : NULL; | 683 Address constant_pool = code ? code->constant_pool() : NULL; |
| 686 set_target_address_at(pc, constant_pool, target, icache_flush_mode); | 684 set_target_address_at(isolate, pc, constant_pool, target, |
| 685 icache_flush_mode); |
| 687 } | 686 } |
| 688 | 687 |
| 689 // Return the code target address at a call site from the return address | 688 // Return the code target address at a call site from the return address |
| 690 // of that call in the instruction stream. | 689 // of that call in the instruction stream. |
| 691 INLINE(static Address target_address_from_return_address(Address pc)); | 690 INLINE(static Address target_address_from_return_address(Address pc)); |
| 692 | 691 |
| 693 // Given the address of the beginning of a call, return the address | 692 // Given the address of the beginning of a call, return the address |
| 694 // in the instruction stream that the call will return from. | 693 // in the instruction stream that the call will return from. |
| 695 INLINE(static Address return_address_from_call_start(Address pc)); | 694 INLINE(static Address return_address_from_call_start(Address pc)); |
| 696 | 695 |
| 697 // This sets the branch destination (which is in the constant pool on ARM). | 696 // This sets the branch destination (which is in the constant pool on ARM). |
| 698 // This is for calls and branches within generated code. | 697 // This is for calls and branches within generated code. |
| 699 inline static void deserialization_set_special_target_at( | 698 inline static void deserialization_set_special_target_at( |
| 700 Address constant_pool_entry, Code* code, Address target); | 699 Isolate* isolate, Address constant_pool_entry, Code* code, |
| 700 Address target); |
| 701 | 701 |
| 702 // This sets the internal reference at the pc. | 702 // This sets the internal reference at the pc. |
| 703 inline static void deserialization_set_target_internal_reference_at( | 703 inline static void deserialization_set_target_internal_reference_at( |
| 704 Address pc, Address target, | 704 Isolate* isolate, Address pc, Address target, |
| 705 RelocInfo::Mode mode = RelocInfo::INTERNAL_REFERENCE); | 705 RelocInfo::Mode mode = RelocInfo::INTERNAL_REFERENCE); |
| 706 | 706 |
| 707 // Here we are patching the address in the constant pool, not the actual call | 707 // Here we are patching the address in the constant pool, not the actual call |
| 708 // instruction. The address in the constant pool is the same size as a | 708 // instruction. The address in the constant pool is the same size as a |
| 709 // pointer. | 709 // pointer. |
| 710 static const int kSpecialTargetSize = kPointerSize; | 710 static const int kSpecialTargetSize = kPointerSize; |
| 711 | 711 |
| 712 // Size of an instruction. | 712 // Size of an instruction. |
| 713 static const int kInstrSize = sizeof(Instr); | 713 static const int kInstrSize = sizeof(Instr); |
| 714 | 714 |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1627 explicit EnsureSpace(Assembler* assembler) { | 1627 explicit EnsureSpace(Assembler* assembler) { |
| 1628 assembler->CheckBuffer(); | 1628 assembler->CheckBuffer(); |
| 1629 } | 1629 } |
| 1630 }; | 1630 }; |
| 1631 | 1631 |
| 1632 | 1632 |
| 1633 } // namespace internal | 1633 } // namespace internal |
| 1634 } // namespace v8 | 1634 } // namespace v8 |
| 1635 | 1635 |
| 1636 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1636 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
| OLD | NEW |