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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 DCHECK(IsWasmMemorySizeReference(rmode_)); | 226 DCHECK(IsWasmMemorySizeReference(rmode_)); |
227 return static_cast<uint32_t>( | 227 return static_cast<uint32_t>( |
228 reinterpret_cast<intptr_t>(Assembler::target_address_at(pc_, host_))); | 228 reinterpret_cast<intptr_t>(Assembler::target_address_at(pc_, host_))); |
229 } | 229 } |
230 | 230 |
231 Address RelocInfo::wasm_global_reference() { | 231 Address RelocInfo::wasm_global_reference() { |
232 DCHECK(IsWasmGlobalReference(rmode_)); | 232 DCHECK(IsWasmGlobalReference(rmode_)); |
233 return Assembler::target_address_at(pc_, host_); | 233 return Assembler::target_address_at(pc_, host_); |
234 } | 234 } |
235 | 235 |
236 void RelocInfo::update_wasm_memory_reference( | 236 void RelocInfo::unchecked_update_wasm_memory_reference( |
237 Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, | 237 Address address, ICacheFlushMode flush_mode) { |
238 ICacheFlushMode icache_flush_mode) { | 238 Assembler::set_target_address_at(isolate_, pc_, host_, address, flush_mode); |
239 DCHECK(IsWasmMemoryReference(rmode_) || IsWasmMemorySizeReference(rmode_)); | |
240 if (IsWasmMemoryReference(rmode_)) { | |
241 Address updated_memory_reference; | |
242 DCHECK(old_base <= wasm_memory_reference() && | |
243 wasm_memory_reference() < old_base + old_size); | |
244 updated_memory_reference = new_base + (wasm_memory_reference() - old_base); | |
245 DCHECK(new_base <= updated_memory_reference && | |
246 updated_memory_reference < new_base + new_size); | |
247 Assembler::set_target_address_at( | |
248 isolate_, pc_, host_, updated_memory_reference, icache_flush_mode); | |
249 } else if (IsWasmMemorySizeReference(rmode_)) { | |
250 uint32_t updated_size_reference; | |
251 DCHECK(wasm_memory_size_reference() <= old_size); | |
252 updated_size_reference = | |
253 new_size + (wasm_memory_size_reference() - old_size); | |
254 DCHECK(updated_size_reference <= new_size); | |
255 Assembler::set_target_address_at( | |
256 isolate_, pc_, host_, reinterpret_cast<Address>(updated_size_reference), | |
257 icache_flush_mode); | |
258 } else { | |
259 UNREACHABLE(); | |
260 } | |
261 } | 239 } |
262 | 240 |
263 void RelocInfo::update_wasm_global_reference( | 241 void RelocInfo::unchecked_update_wasm_memory_size(uint32_t size, |
264 Address old_base, Address new_base, ICacheFlushMode icache_flush_mode) { | 242 ICacheFlushMode flush_mode) { |
265 DCHECK(IsWasmGlobalReference(rmode_)); | 243 Assembler::set_target_address_at(isolate_, pc_, host_, |
266 Address updated_reference; | 244 reinterpret_cast<Address>(size), flush_mode); |
267 DCHECK(old_base <= wasm_global_reference()); | |
268 updated_reference = new_base + (wasm_global_reference() - old_base); | |
269 DCHECK(new_base <= updated_reference); | |
270 Assembler::set_target_address_at(isolate_, pc_, host_, updated_reference, | |
271 icache_flush_mode); | |
272 } | 245 } |
273 | 246 |
274 // ----------------------------------------------------------------------------- | 247 // ----------------------------------------------------------------------------- |
275 // Implementation of Operand and MemOperand | 248 // Implementation of Operand and MemOperand |
276 // See assembler-s390-inl.h for inlined constructors | 249 // See assembler-s390-inl.h for inlined constructors |
277 | 250 |
278 Operand::Operand(Handle<Object> handle) { | 251 Operand::Operand(Handle<Object> handle) { |
279 AllowDeferredHandleDereference using_raw_address; | 252 AllowDeferredHandleDereference using_raw_address; |
280 rm_ = no_reg; | 253 rm_ = no_reg; |
281 // Verify all Objects referred by code are NOT in new space. | 254 // Verify all Objects referred by code are NOT in new space. |
(...skipping 2823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3105 | 3078 |
3106 reloc_info_writer.Write(&rinfo); | 3079 reloc_info_writer.Write(&rinfo); |
3107 } | 3080 } |
3108 | 3081 |
3109 reloc_info_writer.Finish(); | 3082 reloc_info_writer.Finish(); |
3110 } | 3083 } |
3111 | 3084 |
3112 } // namespace internal | 3085 } // namespace internal |
3113 } // namespace v8 | 3086 } // namespace v8 |
3114 #endif // V8_TARGET_ARCH_S390 | 3087 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |