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

Side by Side Diff: src/x64/assembler-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/x64/assembler-x64.h" 5 #include "src/x64/assembler-x64.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #if V8_TARGET_ARCH_X64 9 #if V8_TARGET_ARCH_X64
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 Address RelocInfo::wasm_global_reference() { 128 Address RelocInfo::wasm_global_reference() {
129 DCHECK(IsWasmGlobalReference(rmode_)); 129 DCHECK(IsWasmGlobalReference(rmode_));
130 return Memory::Address_at(pc_); 130 return Memory::Address_at(pc_);
131 } 131 }
132 132
133 uint32_t RelocInfo::wasm_memory_size_reference() { 133 uint32_t RelocInfo::wasm_memory_size_reference() {
134 DCHECK(IsWasmMemorySizeReference(rmode_)); 134 DCHECK(IsWasmMemorySizeReference(rmode_));
135 return Memory::uint32_at(pc_); 135 return Memory::uint32_at(pc_);
136 } 136 }
137 137
138 uint8_t RelocInfo::wasm_memtype_size_reference() {
139 DCHECK(IsWasmMemtypeSizeReference(rmode_));
140 return Memory::uint8_at(pc_);
141 }
142
138 void RelocInfo::unchecked_update_wasm_memory_reference( 143 void RelocInfo::unchecked_update_wasm_memory_reference(
139 Address address, ICacheFlushMode flush_mode) { 144 Address address, ICacheFlushMode flush_mode) {
140 Memory::Address_at(pc_) = address; 145 Memory::Address_at(pc_) = address;
141 } 146 }
142 147
143 void RelocInfo::unchecked_update_wasm_memory_size(uint32_t size, 148 void RelocInfo::unchecked_update_wasm_memory_size(uint32_t size,
144 ICacheFlushMode flush_mode) { 149 ICacheFlushMode flush_mode) {
145 Memory::uint32_at(pc_) = size; 150 Memory::uint32_at(pc_) = size;
146 } 151 }
147 152
(...skipping 4607 matching lines...) Expand 10 before | Expand all | Expand 10 after
4755 4760
4756 bool RelocInfo::IsInConstantPool() { 4761 bool RelocInfo::IsInConstantPool() {
4757 return false; 4762 return false;
4758 } 4763 }
4759 4764
4760 4765
4761 } // namespace internal 4766 } // namespace internal
4762 } // namespace v8 4767 } // namespace v8
4763 4768
4764 #endif // V8_TARGET_ARCH_X64 4769 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698