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

Side by Side Diff: src/ppc/assembler-ppc-inl.h

Issue 1845283004: PPC: Assembler changes for enabling GrowHeap in Wasm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 DCHECK(IsInternalReference(rmode_) || IsInternalReferenceEncoded(rmode_)); 82 DCHECK(IsInternalReference(rmode_) || IsInternalReferenceEncoded(rmode_));
83 return reinterpret_cast<Address>(pc_); 83 return reinterpret_cast<Address>(pc_);
84 } 84 }
85 85
86 86
87 Address RelocInfo::target_address() { 87 Address RelocInfo::target_address() {
88 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); 88 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_));
89 return Assembler::target_address_at(pc_, host_); 89 return Assembler::target_address_at(pc_, host_);
90 } 90 }
91 91
92 Address RelocInfo::wasm_memory_reference() {
93 DCHECK(IsWasmMemoryReference(rmode_));
94 return Assembler::target_address_at(pc_, host_);
95 }
92 96
93 Address RelocInfo::target_address_address() { 97 Address RelocInfo::target_address_address() {
94 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) || 98 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) ||
95 rmode_ == EMBEDDED_OBJECT || rmode_ == EXTERNAL_REFERENCE); 99 rmode_ == EMBEDDED_OBJECT || rmode_ == EXTERNAL_REFERENCE);
96 100
97 if (FLAG_enable_embedded_constant_pool && 101 if (FLAG_enable_embedded_constant_pool &&
98 Assembler::IsConstantPoolLoadStart(pc_)) { 102 Assembler::IsConstantPoolLoadStart(pc_)) {
99 // We return the PC for embedded constant pool since this function is used 103 // We return the PC for embedded constant pool since this function is used
100 // by the serializer and expects the address to reside within the code 104 // by the serializer and expects the address to reside within the code
101 // object. 105 // object.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 ConstantPoolEntry::Access access; 176 ConstantPoolEntry::Access access;
173 if (FLAG_enable_embedded_constant_pool && 177 if (FLAG_enable_embedded_constant_pool &&
174 IsConstantPoolLoadStart(pc, &access)) { 178 IsConstantPoolLoadStart(pc, &access)) {
175 len = (access == ConstantPoolEntry::OVERFLOWED) ? 2 : 1; 179 len = (access == ConstantPoolEntry::OVERFLOWED) ? 2 : 1;
176 } else { 180 } else {
177 len = kMovInstructionsNoConstantPool; 181 len = kMovInstructionsNoConstantPool;
178 } 182 }
179 return pc + (len + 2) * kInstrSize; 183 return pc + (len + 2) * kInstrSize;
180 } 184 }
181 185
186 void RelocInfo::update_wasm_memory_reference(
187 Address old_base, Address new_base, size_t old_size, size_t new_size,
188 ICacheFlushMode icache_flush_mode) {
189 DCHECK(IsWasmMemoryReference(rmode_));
190 DCHECK(old_base <= wasm_memory_reference() &&
191 wasm_memory_reference() < old_base + old_size);
192 Address updated_reference = new_base + (wasm_memory_reference() - old_base);
193 DCHECK(new_base <= updated_reference &&
194 updated_reference < new_base + new_size);
195 Assembler::set_target_address_at(isolate_, pc_, host_, updated_reference,
196 icache_flush_mode);
197 }
182 198
183 Object* RelocInfo::target_object() { 199 Object* RelocInfo::target_object() {
184 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 200 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
185 return reinterpret_cast<Object*>(Assembler::target_address_at(pc_, host_)); 201 return reinterpret_cast<Object*>(Assembler::target_address_at(pc_, host_));
186 } 202 }
187 203
188 204
189 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { 205 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) {
190 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 206 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
191 return Handle<Object>( 207 return Handle<Object>(
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 } 702 }
687 #endif 703 #endif
688 return; 704 return;
689 } 705 }
690 UNREACHABLE(); 706 UNREACHABLE();
691 } 707 }
692 } // namespace internal 708 } // namespace internal
693 } // namespace v8 709 } // namespace v8
694 710
695 #endif // V8_PPC_ASSEMBLER_PPC_INL_H_ 711 #endif // V8_PPC_ASSEMBLER_PPC_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698