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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 return Memory::uint32_at(pc_); | 196 return Memory::uint32_at(pc_); |
197 } | 197 } |
198 | 198 |
199 void RelocInfo::update_wasm_memory_reference( | 199 void RelocInfo::update_wasm_memory_reference( |
200 Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, | 200 Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, |
201 ICacheFlushMode icache_flush_mode) { | 201 ICacheFlushMode icache_flush_mode) { |
202 DCHECK(IsWasmMemoryReference(rmode_) || IsWasmMemorySizeReference(rmode_)); | 202 DCHECK(IsWasmMemoryReference(rmode_) || IsWasmMemorySizeReference(rmode_)); |
203 if (IsWasmMemoryReference(rmode_)) { | 203 if (IsWasmMemoryReference(rmode_)) { |
204 Address updated_reference; | 204 Address updated_reference; |
205 DCHECK(old_base <= wasm_memory_reference() && | 205 DCHECK(old_base <= wasm_memory_reference() && |
206 wasm_memory_reference() < old_base + old_size); | 206 wasm_memory_reference() <= old_base + old_size); |
207 updated_reference = new_base + (wasm_memory_reference() - old_base); | 207 updated_reference = new_base + (wasm_memory_reference() - old_base); |
208 DCHECK(new_base <= updated_reference && | 208 DCHECK(new_base <= updated_reference && |
209 updated_reference < new_base + new_size); | 209 updated_reference < new_base + new_size); |
210 Memory::Address_at(pc_) = updated_reference; | 210 Memory::Address_at(pc_) = updated_reference; |
211 } else if (IsWasmMemorySizeReference(rmode_)) { | 211 } else if (IsWasmMemorySizeReference(rmode_)) { |
212 uint32_t updated_size_reference; | 212 uint32_t updated_size_reference; |
213 DCHECK(wasm_memory_size_reference() <= old_size); | 213 DCHECK(wasm_memory_size_reference() <= old_size); |
214 updated_size_reference = | 214 updated_size_reference = |
215 new_size + (wasm_memory_size_reference() - old_size); | 215 new_size + (wasm_memory_size_reference() - old_size); |
216 DCHECK(updated_size_reference <= new_size); | 216 DCHECK(updated_size_reference <= new_size); |
(...skipping 2871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3088 fflush(coverage_log); | 3088 fflush(coverage_log); |
3089 } | 3089 } |
3090 } | 3090 } |
3091 | 3091 |
3092 #endif | 3092 #endif |
3093 | 3093 |
3094 } // namespace internal | 3094 } // namespace internal |
3095 } // namespace v8 | 3095 } // namespace v8 |
3096 | 3096 |
3097 #endif // V8_TARGET_ARCH_IA32 | 3097 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |