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

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

Issue 1808823002: Revert of Assembler changes for enabling GrowHeap in Wasm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/ia32/assembler-ia32-inl.h ('k') | src/mips64/assembler-mips64-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 1
2 // Copyright (c) 1994-2006 Sun Microsystems Inc. 2 // Copyright (c) 1994-2006 Sun Microsystems Inc.
3 // All Rights Reserved. 3 // All Rights Reserved.
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // - Redistributions of source code must retain the above copyright notice, 9 // - Redistributions of source code must retain the above copyright notice,
10 // this list of conditions and the following disclaimer. 10 // this list of conditions and the following disclaimer.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 Assembler::FlushICache(isolate_, p, count * sizeof(uint32_t)); 95 Assembler::FlushICache(isolate_, p, count * sizeof(uint32_t));
96 } 96 }
97 } 97 }
98 98
99 99
100 Address RelocInfo::target_address() { 100 Address RelocInfo::target_address() {
101 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); 101 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_));
102 return Assembler::target_address_at(pc_, host_); 102 return Assembler::target_address_at(pc_, host_);
103 } 103 }
104 104
105 Address RelocInfo::wasm_memory_reference() {
106 DCHECK(IsWasmMemoryReference(rmode_));
107 return Assembler::target_address_at(pc_, host_);
108 }
109 105
110 Address RelocInfo::target_address_address() { 106 Address RelocInfo::target_address_address() {
111 DCHECK(IsCodeTarget(rmode_) || 107 DCHECK(IsCodeTarget(rmode_) ||
112 IsRuntimeEntry(rmode_) || 108 IsRuntimeEntry(rmode_) ||
113 rmode_ == EMBEDDED_OBJECT || 109 rmode_ == EMBEDDED_OBJECT ||
114 rmode_ == EXTERNAL_REFERENCE); 110 rmode_ == EXTERNAL_REFERENCE);
115 // Read the address of the word containing the target_address in an 111 // Read the address of the word containing the target_address in an
116 // instruction stream. 112 // instruction stream.
117 // The only architecture-independent user of this function is the serializer. 113 // The only architecture-independent user of this function is the serializer.
118 // The serializer uses it to find out how many raw bytes of instruction to 114 // The serializer uses it to find out how many raw bytes of instruction to
(...skipping 30 matching lines...) Expand all
149 Assembler::set_target_address_at(isolate_, pc_, host_, target, 145 Assembler::set_target_address_at(isolate_, pc_, host_, target,
150 icache_flush_mode); 146 icache_flush_mode);
151 if (write_barrier_mode == UPDATE_WRITE_BARRIER && 147 if (write_barrier_mode == UPDATE_WRITE_BARRIER &&
152 host() != NULL && IsCodeTarget(rmode_)) { 148 host() != NULL && IsCodeTarget(rmode_)) {
153 Object* target_code = Code::GetCodeFromTargetAddress(target); 149 Object* target_code = Code::GetCodeFromTargetAddress(target);
154 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( 150 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(
155 host(), this, HeapObject::cast(target_code)); 151 host(), this, HeapObject::cast(target_code));
156 } 152 }
157 } 153 }
158 154
159 void RelocInfo::update_wasm_memory_reference(
160 Address old_base, Address new_base, size_t old_size, size_t new_size,
161 ICacheFlushMode icache_flush_mode) {
162 DCHECK(IsWasmMemoryReference(rmode_));
163 DCHECK(old_base <= wasm_memory_reference() &&
164 wasm_memory_reference() < old_base + old_size);
165 Address updated_reference = new_base + (wasm_memory_reference() - old_base);
166 DCHECK(new_base <= updated_reference &&
167 updated_reference < new_base + new_size);
168 Assembler::set_target_address_at(isolate_, pc_, host_, updated_reference,
169 icache_flush_mode);
170 }
171 155
172 Address Assembler::target_address_from_return_address(Address pc) { 156 Address Assembler::target_address_from_return_address(Address pc) {
173 return pc - kCallTargetAddressOffset; 157 return pc - kCallTargetAddressOffset;
174 } 158 }
175 159
176 160
177 void Assembler::set_target_internal_reference_encoded_at(Address pc, 161 void Assembler::set_target_internal_reference_encoded_at(Address pc,
178 Address target) { 162 Address target) {
179 Instr instr1 = Assembler::instr_at(pc + 0 * Assembler::kInstrSize); 163 Instr instr1 = Assembler::instr_at(pc + 0 * Assembler::kInstrSize);
180 Instr instr2 = Assembler::instr_at(pc + 1 * Assembler::kInstrSize); 164 Instr instr2 = Assembler::instr_at(pc + 1 * Assembler::kInstrSize);
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 CheckBuffer(); 479 CheckBuffer();
496 } 480 }
497 EmitHelper(x, is_compact_branch); 481 EmitHelper(x, is_compact_branch);
498 } 482 }
499 483
500 484
501 } // namespace internal 485 } // namespace internal
502 } // namespace v8 486 } // namespace v8
503 487
504 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ 488 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32-inl.h ('k') | src/mips64/assembler-mips64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698