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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 void RelocInfo::update_wasm_memory_reference( | 252 void RelocInfo::update_wasm_memory_reference( |
253 Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, | 253 Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, |
254 ICacheFlushMode icache_flush_mode) { | 254 ICacheFlushMode icache_flush_mode) { |
255 DCHECK(IsWasmMemoryReference(rmode_) || IsWasmMemorySizeReference(rmode_)); | 255 DCHECK(IsWasmMemoryReference(rmode_) || IsWasmMemorySizeReference(rmode_)); |
256 if (IsWasmMemoryReference(rmode_)) { | 256 if (IsWasmMemoryReference(rmode_)) { |
257 Address updated_memory_reference; | 257 Address updated_memory_reference; |
258 DCHECK(old_base <= wasm_memory_reference() && | 258 DCHECK(old_base <= wasm_memory_reference() && |
259 wasm_memory_reference() < old_base + old_size); | 259 wasm_memory_reference() <= old_base + old_size); |
260 updated_memory_reference = new_base + (wasm_memory_reference() - old_base); | 260 updated_memory_reference = new_base + (wasm_memory_reference() - old_base); |
261 DCHECK(new_base <= updated_memory_reference && | 261 DCHECK(new_base <= updated_memory_reference && |
262 updated_memory_reference < new_base + new_size); | 262 updated_memory_reference < new_base + new_size); |
263 Assembler::set_target_address_at( | 263 Assembler::set_target_address_at( |
264 isolate_, pc_, host_, updated_memory_reference, icache_flush_mode); | 264 isolate_, pc_, host_, updated_memory_reference, icache_flush_mode); |
265 } else if (IsWasmMemorySizeReference(rmode_)) { | 265 } else if (IsWasmMemorySizeReference(rmode_)) { |
266 uint32_t updated_size_reference; | 266 uint32_t updated_size_reference; |
267 DCHECK(wasm_memory_size_reference() <= old_size); | 267 DCHECK(wasm_memory_size_reference() <= old_size); |
268 updated_size_reference = | 268 updated_size_reference = |
269 new_size + (wasm_memory_size_reference() - old_size); | 269 new_size + (wasm_memory_size_reference() - old_size); |
(...skipping 4005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4275 DCHECK(is_uint12(offset)); | 4275 DCHECK(is_uint12(offset)); |
4276 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); | 4276 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); |
4277 } | 4277 } |
4278 } | 4278 } |
4279 | 4279 |
4280 | 4280 |
4281 } // namespace internal | 4281 } // namespace internal |
4282 } // namespace v8 | 4282 } // namespace v8 |
4283 | 4283 |
4284 #endif // V8_TARGET_ARCH_ARM | 4284 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |