Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1012)

Side by Side Diff: src/arm/assembler-arm-inl.h

Issue 1808823002: Revert of Assembler changes for enabling GrowHeap in Wasm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/arm64/assembler-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // We do not use pc relative addressing on ARM, so there is 64 // We do not use pc relative addressing on ARM, so there is
65 // nothing else to do. 65 // nothing else to do.
66 } 66 }
67 67
68 68
69 Address RelocInfo::target_address() { 69 Address RelocInfo::target_address() {
70 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); 70 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_));
71 return Assembler::target_address_at(pc_, host_); 71 return Assembler::target_address_at(pc_, host_);
72 } 72 }
73 73
74 Address RelocInfo::wasm_memory_reference() {
75 DCHECK(IsWasmMemoryReference(rmode_));
76 return Assembler::target_address_at(pc_, host_);
77 }
78 74
79 Address RelocInfo::target_address_address() { 75 Address RelocInfo::target_address_address() {
80 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) 76 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)
81 || rmode_ == EMBEDDED_OBJECT 77 || rmode_ == EMBEDDED_OBJECT
82 || rmode_ == EXTERNAL_REFERENCE); 78 || rmode_ == EXTERNAL_REFERENCE);
83 if (FLAG_enable_embedded_constant_pool || 79 if (FLAG_enable_embedded_constant_pool ||
84 Assembler::IsMovW(Memory::int32_at(pc_))) { 80 Assembler::IsMovW(Memory::int32_at(pc_))) {
85 // We return the PC for embedded constant pool since this function is used 81 // We return the PC for embedded constant pool since this function is used
86 // by the serializer and expects the address to reside within the code 82 // by the serializer and expects the address to reside within the code
87 // object. 83 // object.
(...skipping 23 matching lines...) Expand all
111 Assembler::set_target_address_at(isolate_, pc_, host_, target, 107 Assembler::set_target_address_at(isolate_, pc_, host_, target,
112 icache_flush_mode); 108 icache_flush_mode);
113 if (write_barrier_mode == UPDATE_WRITE_BARRIER && 109 if (write_barrier_mode == UPDATE_WRITE_BARRIER &&
114 host() != NULL && IsCodeTarget(rmode_)) { 110 host() != NULL && IsCodeTarget(rmode_)) {
115 Object* target_code = Code::GetCodeFromTargetAddress(target); 111 Object* target_code = Code::GetCodeFromTargetAddress(target);
116 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( 112 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(
117 host(), this, HeapObject::cast(target_code)); 113 host(), this, HeapObject::cast(target_code));
118 } 114 }
119 } 115 }
120 116
121 void RelocInfo::update_wasm_memory_reference(
122 Address old_base, Address new_base, size_t old_size, size_t new_size,
123 ICacheFlushMode icache_flush_mode) {
124 DCHECK(IsWasmMemoryReference(rmode_));
125 DCHECK(old_base <= wasm_memory_reference() &&
126 wasm_memory_reference() < old_base + old_size);
127 Address updated_reference = new_base + (wasm_memory_reference() - old_base);
128 DCHECK(new_base <= updated_reference &&
129 updated_reference < new_base + new_size);
130 Assembler::set_target_address_at(isolate_, pc_, host_, updated_reference,
131 icache_flush_mode);
132 }
133 117
134 Object* RelocInfo::target_object() { 118 Object* RelocInfo::target_object() {
135 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 119 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
136 return reinterpret_cast<Object*>(Assembler::target_address_at(pc_, host_)); 120 return reinterpret_cast<Object*>(Assembler::target_address_at(pc_, host_));
137 } 121 }
138 122
139 123
140 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { 124 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) {
141 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 125 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
142 return Handle<Object>(reinterpret_cast<Object**>( 126 return Handle<Object>(reinterpret_cast<Object**>(
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 Assembler::FlushICache(isolate, pc, 4 * kInstrSize); 603 Assembler::FlushICache(isolate, pc, 4 * kInstrSize);
620 } 604 }
621 } 605 }
622 } 606 }
623 607
624 608
625 } // namespace internal 609 } // namespace internal
626 } // namespace v8 610 } // namespace v8
627 611
628 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ 612 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm64/assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698