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

Side by Side Diff: src/mips64/assembler-mips64.cc

Issue 2416543002: [wasm] Fix bounds check for zero initial memory. (Closed)
Patch Set: Add aTODO Created 4 years, 2 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
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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 DCHECK(IsWasmGlobalReference(rmode_)); 176 DCHECK(IsWasmGlobalReference(rmode_));
177 return Assembler::target_address_at(pc_, host_); 177 return Assembler::target_address_at(pc_, host_);
178 } 178 }
179 179
180 uint32_t RelocInfo::wasm_memory_size_reference() { 180 uint32_t RelocInfo::wasm_memory_size_reference() {
181 DCHECK(IsWasmMemorySizeReference(rmode_)); 181 DCHECK(IsWasmMemorySizeReference(rmode_));
182 return static_cast<uint32_t>( 182 return static_cast<uint32_t>(
183 reinterpret_cast<intptr_t>((Assembler::target_address_at(pc_, host_)))); 183 reinterpret_cast<intptr_t>((Assembler::target_address_at(pc_, host_))));
184 } 184 }
185 185
186 uint8_t RelocInfo::wasm_memtype_size_reference() {
187 DCHECK(IsWasmMemtypeSizeReference(rmode_));
188 return static_cast<uint8_t>(
189 reinterpret_cast<intptr_t>((Assembler::target_address_at(pc_, host_))));
190 }
191
186 void RelocInfo::unchecked_update_wasm_memory_reference( 192 void RelocInfo::unchecked_update_wasm_memory_reference(
187 Address address, ICacheFlushMode flush_mode) { 193 Address address, ICacheFlushMode flush_mode) {
188 Assembler::set_target_address_at(isolate_, pc_, host_, address, flush_mode); 194 Assembler::set_target_address_at(isolate_, pc_, host_, address, flush_mode);
189 } 195 }
190 196
191 void RelocInfo::unchecked_update_wasm_memory_size(uint32_t size, 197 void RelocInfo::unchecked_update_wasm_memory_size(uint32_t size,
192 ICacheFlushMode flush_mode) { 198 ICacheFlushMode flush_mode) {
193 Assembler::set_target_address_at(isolate_, pc_, host_, 199 Assembler::set_target_address_at(isolate_, pc_, host_,
194 reinterpret_cast<Address>(size), flush_mode); 200 reinterpret_cast<Address>(size), flush_mode);
195 } 201 }
(...skipping 3286 matching lines...) Expand 10 before | Expand all | Expand 10 after
3482 3488
3483 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 3489 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
3484 Assembler::FlushICache(isolate, pc, 4 * Assembler::kInstrSize); 3490 Assembler::FlushICache(isolate, pc, 4 * Assembler::kInstrSize);
3485 } 3491 }
3486 } 3492 }
3487 3493
3488 } // namespace internal 3494 } // namespace internal
3489 } // namespace v8 3495 } // namespace v8
3490 3496
3491 #endif // V8_TARGET_ARCH_MIPS64 3497 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698