OLD | NEW |
---|---|
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
242 Address RelocInfo::wasm_memory_reference() { | 242 Address RelocInfo::wasm_memory_reference() { |
243 DCHECK(IsWasmMemoryReference(rmode_)); | 243 DCHECK(IsWasmMemoryReference(rmode_)); |
244 return Assembler::target_address_at(pc_, host_); | 244 return Assembler::target_address_at(pc_, host_); |
245 } | 245 } |
246 | 246 |
247 uint32_t RelocInfo::wasm_memory_size_reference() { | 247 uint32_t RelocInfo::wasm_memory_size_reference() { |
248 DCHECK(IsWasmMemorySizeReference(rmode_)); | 248 DCHECK(IsWasmMemorySizeReference(rmode_)); |
249 return reinterpret_cast<uint32_t>(Assembler::target_address_at(pc_, host_)); | 249 return reinterpret_cast<uint32_t>(Assembler::target_address_at(pc_, host_)); |
250 } | 250 } |
251 | 251 |
252 uint32_t RelocInfo::wasm_function_index() { | |
titzer
2016/06/02 13:17:08
This function basically assumes that the call site
Mircea Trofin
2016/06/02 14:46:21
The statement about the assumption is correct.
Se
| |
253 DCHECK(IsWasmDirectCall(rmode_)); | |
254 return reinterpret_cast<uint32_t>(Assembler::target_address_at(pc_, host_)); | |
255 } | |
256 | |
252 void RelocInfo::update_wasm_memory_reference( | 257 void RelocInfo::update_wasm_memory_reference( |
253 Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, | 258 Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, |
254 ICacheFlushMode icache_flush_mode) { | 259 ICacheFlushMode icache_flush_mode) { |
255 DCHECK(IsWasmMemoryReference(rmode_) || IsWasmMemorySizeReference(rmode_)); | 260 DCHECK(IsWasmMemoryReference(rmode_) || IsWasmMemorySizeReference(rmode_)); |
256 if (IsWasmMemoryReference(rmode_)) { | 261 if (IsWasmMemoryReference(rmode_)) { |
257 Address updated_memory_reference; | 262 Address updated_memory_reference; |
258 DCHECK(old_base <= wasm_memory_reference() && | 263 DCHECK(old_base <= wasm_memory_reference() && |
259 wasm_memory_reference() < old_base + old_size); | 264 wasm_memory_reference() < old_base + old_size); |
260 updated_memory_reference = new_base + (wasm_memory_reference() - old_base); | 265 updated_memory_reference = new_base + (wasm_memory_reference() - old_base); |
261 DCHECK(new_base <= updated_memory_reference && | 266 DCHECK(new_base <= updated_memory_reference && |
(...skipping 4029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4291 DCHECK(is_uint12(offset)); | 4296 DCHECK(is_uint12(offset)); |
4292 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); | 4297 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); |
4293 } | 4298 } |
4294 } | 4299 } |
4295 | 4300 |
4296 | 4301 |
4297 } // namespace internal | 4302 } // namespace internal |
4298 } // namespace v8 | 4303 } // namespace v8 |
4299 | 4304 |
4300 #endif // V8_TARGET_ARCH_ARM | 4305 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |