| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Address RelocInfo::wasm_global_reference() { | 252 Address RelocInfo::wasm_global_reference() { |
| 253 DCHECK(IsWasmGlobalReference(rmode_)); | 253 DCHECK(IsWasmGlobalReference(rmode_)); |
| 254 return Assembler::target_address_at(pc_, host_); | 254 return Assembler::target_address_at(pc_, host_); |
| 255 } | 255 } |
| 256 | 256 |
| 257 void RelocInfo::update_wasm_memory_reference( | 257 void RelocInfo::unchecked_update_wasm_memory_reference( |
| 258 Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, | 258 Address address, ICacheFlushMode flush_mode) { |
| 259 ICacheFlushMode icache_flush_mode) { | 259 Assembler::set_target_address_at(isolate_, pc_, host_, address, flush_mode); |
| 260 DCHECK(IsWasmMemoryReference(rmode_) || IsWasmMemorySizeReference(rmode_)); | |
| 261 if (IsWasmMemoryReference(rmode_)) { | |
| 262 Address updated_memory_reference; | |
| 263 DCHECK(old_base <= wasm_memory_reference() && | |
| 264 wasm_memory_reference() < old_base + old_size); | |
| 265 updated_memory_reference = new_base + (wasm_memory_reference() - old_base); | |
| 266 DCHECK(new_base <= updated_memory_reference && | |
| 267 updated_memory_reference < new_base + new_size); | |
| 268 Assembler::set_target_address_at( | |
| 269 isolate_, pc_, host_, updated_memory_reference, icache_flush_mode); | |
| 270 } else if (IsWasmMemorySizeReference(rmode_)) { | |
| 271 uint32_t updated_size_reference; | |
| 272 DCHECK(wasm_memory_size_reference() <= old_size); | |
| 273 updated_size_reference = | |
| 274 new_size + (wasm_memory_size_reference() - old_size); | |
| 275 DCHECK(updated_size_reference <= new_size); | |
| 276 Assembler::set_target_address_at( | |
| 277 isolate_, pc_, host_, reinterpret_cast<Address>(updated_size_reference), | |
| 278 icache_flush_mode); | |
| 279 } else { | |
| 280 UNREACHABLE(); | |
| 281 } | |
| 282 } | 260 } |
| 283 | 261 |
| 284 void RelocInfo::update_wasm_global_reference( | 262 void RelocInfo::unchecked_update_wasm_memory_size(uint32_t size, |
| 285 Address old_base, Address new_base, ICacheFlushMode icache_flush_mode) { | 263 ICacheFlushMode flush_mode) { |
| 286 DCHECK(IsWasmGlobalReference(rmode_)); | 264 Assembler::set_target_address_at(isolate_, pc_, host_, |
| 287 Address updated_reference; | 265 reinterpret_cast<Address>(size), flush_mode); |
| 288 DCHECK(old_base <= wasm_global_reference()); | |
| 289 updated_reference = new_base + (wasm_global_reference() - old_base); | |
| 290 DCHECK(new_base <= updated_reference); | |
| 291 Assembler::set_target_address_at(isolate_, pc_, host_, updated_reference, | |
| 292 icache_flush_mode); | |
| 293 } | 266 } |
| 294 | 267 |
| 295 // ----------------------------------------------------------------------------- | 268 // ----------------------------------------------------------------------------- |
| 296 // Implementation of Operand and MemOperand | 269 // Implementation of Operand and MemOperand |
| 297 // See assembler-arm-inl.h for inlined constructors | 270 // See assembler-arm-inl.h for inlined constructors |
| 298 | 271 |
| 299 Operand::Operand(Handle<Object> handle) { | 272 Operand::Operand(Handle<Object> handle) { |
| 300 AllowDeferredHandleDereference using_raw_address; | 273 AllowDeferredHandleDereference using_raw_address; |
| 301 rm_ = no_reg; | 274 rm_ = no_reg; |
| 302 // Verify all Objects referred by code are NOT in new space. | 275 // Verify all Objects referred by code are NOT in new space. |
| (...skipping 3988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4291 DCHECK(is_uint12(offset)); | 4264 DCHECK(is_uint12(offset)); |
| 4292 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); | 4265 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); |
| 4293 } | 4266 } |
| 4294 } | 4267 } |
| 4295 | 4268 |
| 4296 | 4269 |
| 4297 } // namespace internal | 4270 } // namespace internal |
| 4298 } // namespace v8 | 4271 } // namespace v8 |
| 4299 | 4272 |
| 4300 #endif // V8_TARGET_ARCH_ARM | 4273 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |