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

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

Issue 195983002: Reland "Pass a Code object to Assembler::(set_)target_address_at for use by ool constant pool." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix ia32 and x64 bug/ Created 6 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/a64/assembler-a64-inl.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 // RelocInfo and pools ------------------------------------------------------ 773 // RelocInfo and pools ------------------------------------------------------
774 774
775 // Record relocation information for current pc_. 775 // Record relocation information for current pc_.
776 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); 776 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0);
777 777
778 // Return the address in the constant pool of the code target address used by 778 // Return the address in the constant pool of the code target address used by
779 // the branch/call instruction at pc. 779 // the branch/call instruction at pc.
780 inline static Address target_pointer_address_at(Address pc); 780 inline static Address target_pointer_address_at(Address pc);
781 781
782 // Read/Modify the code target address in the branch/call instruction at pc. 782 // Read/Modify the code target address in the branch/call instruction at pc.
783 inline static Address target_address_at(Address pc); 783 inline static Address target_address_at(Address pc,
784 inline static void set_target_address_at(Address pc, Address target); 784 ConstantPoolArray* constant_pool);
785 inline static void set_target_address_at(Address pc,
786 ConstantPoolArray* constant_pool,
787 Address target);
788 static inline Address target_address_at(Address pc, Code* code);
789 static inline void set_target_address_at(Address pc,
790 Code* code,
791 Address target);
785 792
786 // Return the code target address at a call site from the return address of 793 // Return the code target address at a call site from the return address of
787 // that call in the instruction stream. 794 // that call in the instruction stream.
788 inline static Address target_address_from_return_address(Address pc); 795 inline static Address target_address_from_return_address(Address pc);
789 796
790 // Given the address of the beginning of a call, return the address in the 797 // Given the address of the beginning of a call, return the address in the
791 // instruction stream that call will return from. 798 // instruction stream that call will return from.
792 inline static Address return_address_from_call_start(Address pc); 799 inline static Address return_address_from_call_start(Address pc);
793 800
794 // This sets the branch destination (which is in the constant pool on ARM). 801 // This sets the branch destination (which is in the constant pool on ARM).
795 // This is for calls and branches within generated code. 802 // This is for calls and branches within generated code.
796 inline static void deserialization_set_special_target_at( 803 inline static void deserialization_set_special_target_at(
797 Address constant_pool_entry, Address target); 804 Address constant_pool_entry, Code* code, Address target);
798 805
799 // All addresses in the constant pool are the same size as pointers. 806 // All addresses in the constant pool are the same size as pointers.
800 static const int kSpecialTargetSize = kPointerSize; 807 static const int kSpecialTargetSize = kPointerSize;
801 808
802 // The sizes of the call sequences emitted by MacroAssembler::Call. 809 // The sizes of the call sequences emitted by MacroAssembler::Call.
803 // Wherever possible, use MacroAssembler::CallSize instead of these constants, 810 // Wherever possible, use MacroAssembler::CallSize instead of these constants,
804 // as it will choose the correct value for a given relocation mode. 811 // as it will choose the correct value for a given relocation mode.
805 // 812 //
806 // Without relocation: 813 // Without relocation:
807 // movz ip0, #(target & 0x000000000000ffff) 814 // movz ip0, #(target & 0x000000000000ffff)
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
2189 class EnsureSpace BASE_EMBEDDED { 2196 class EnsureSpace BASE_EMBEDDED {
2190 public: 2197 public:
2191 explicit EnsureSpace(Assembler* assembler) { 2198 explicit EnsureSpace(Assembler* assembler) {
2192 assembler->CheckBuffer(); 2199 assembler->CheckBuffer();
2193 } 2200 }
2194 }; 2201 };
2195 2202
2196 } } // namespace v8::internal 2203 } } // namespace v8::internal
2197 2204
2198 #endif // V8_A64_ASSEMBLER_A64_H_ 2205 #endif // V8_A64_ASSEMBLER_A64_H_
OLDNEW
« no previous file with comments | « no previous file | src/a64/assembler-a64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698