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

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

Issue 183803022: 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: 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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 // RelocInfo and constant pool ---------------------------------------------- 733 // RelocInfo and constant pool ----------------------------------------------
734 734
735 // Record relocation information for current pc_. 735 // Record relocation information for current pc_.
736 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); 736 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0);
737 737
738 // Return the address in the constant pool of the code target address used by 738 // Return the address in the constant pool of the code target address used by
739 // the branch/call instruction at pc. 739 // the branch/call instruction at pc.
740 inline static Address target_pointer_address_at(Address pc); 740 inline static Address target_pointer_address_at(Address pc);
741 741
742 // Read/Modify the code target address in the branch/call instruction at pc. 742 // Read/Modify the code target address in the branch/call instruction at pc.
743 inline static Address target_address_at(Address pc); 743 inline static Address target_address_at(Address pc,
744 inline static void set_target_address_at(Address pc, Address target); 744 ConstantPoolArray* constant_pool);
745 inline static void set_target_address_at(Address pc,
746 ConstantPoolArray* constant_pool,
747 Address target);
748 static inline Address target_address_at(Address pc, Code* code);
749 static inline void set_target_address_at(Address pc,
750 Code* code,
751 Address target);
745 752
746 // Return the code target address at a call site from the return address of 753 // Return the code target address at a call site from the return address of
747 // that call in the instruction stream. 754 // that call in the instruction stream.
748 inline static Address target_address_from_return_address(Address pc); 755 inline static Address target_address_from_return_address(Address pc);
749 756
750 // Given the address of the beginning of a call, return the address in the 757 // Given the address of the beginning of a call, return the address in the
751 // instruction stream that call will return from. 758 // instruction stream that call will return from.
752 inline static Address return_address_from_call_start(Address pc); 759 inline static Address return_address_from_call_start(Address pc);
753 760
754 // This sets the branch destination (which is in the constant pool on ARM). 761 // This sets the branch destination (which is in the constant pool on ARM).
755 // This is for calls and branches within generated code. 762 // This is for calls and branches within generated code.
756 inline static void deserialization_set_special_target_at( 763 inline static void deserialization_set_special_target_at(
757 Address constant_pool_entry, Address target); 764 Address constant_pool_entry, Code* code, Address target);
758 765
759 // All addresses in the constant pool are the same size as pointers. 766 // All addresses in the constant pool are the same size as pointers.
760 static const int kSpecialTargetSize = kPointerSize; 767 static const int kSpecialTargetSize = kPointerSize;
761 768
762 // The sizes of the call sequences emitted by MacroAssembler::Call. 769 // The sizes of the call sequences emitted by MacroAssembler::Call.
763 // Wherever possible, use MacroAssembler::CallSize instead of these constants, 770 // Wherever possible, use MacroAssembler::CallSize instead of these constants,
764 // as it will choose the correct value for a given relocation mode. 771 // as it will choose the correct value for a given relocation mode.
765 // 772 //
766 // Without relocation: 773 // Without relocation:
767 // movz ip0, #(target & 0x000000000000ffff) 774 // movz ip0, #(target & 0x000000000000ffff)
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2076 class EnsureSpace BASE_EMBEDDED { 2083 class EnsureSpace BASE_EMBEDDED {
2077 public: 2084 public:
2078 explicit EnsureSpace(Assembler* assembler) { 2085 explicit EnsureSpace(Assembler* assembler) {
2079 assembler->CheckBuffer(); 2086 assembler->CheckBuffer();
2080 } 2087 }
2081 }; 2088 };
2082 2089
2083 } } // namespace v8::internal 2090 } } // namespace v8::internal
2084 2091
2085 #endif // V8_A64_ASSEMBLER_A64_H_ 2092 #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