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

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

Issue 1848353002: S390: Assembler changes for enabling GrowHeap in Wasm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | no next file » | 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 Address RelocInfo::target_internal_reference_address() { 86 Address RelocInfo::target_internal_reference_address() {
87 DCHECK(IsInternalReference(rmode_) || IsInternalReferenceEncoded(rmode_)); 87 DCHECK(IsInternalReference(rmode_) || IsInternalReferenceEncoded(rmode_));
88 return reinterpret_cast<Address>(pc_); 88 return reinterpret_cast<Address>(pc_);
89 } 89 }
90 90
91 Address RelocInfo::target_address() { 91 Address RelocInfo::target_address() {
92 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); 92 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_));
93 return Assembler::target_address_at(pc_, host_); 93 return Assembler::target_address_at(pc_, host_);
94 } 94 }
95 95
96 Address RelocInfo::wasm_memory_reference() {
97 DCHECK(IsWasmMemoryReference(rmode_));
98 return Assembler::target_address_at(pc_, host_);
99 }
100
96 Address RelocInfo::target_address_address() { 101 Address RelocInfo::target_address_address() {
97 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) || 102 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) ||
98 rmode_ == EMBEDDED_OBJECT || rmode_ == EXTERNAL_REFERENCE); 103 rmode_ == EMBEDDED_OBJECT || rmode_ == EXTERNAL_REFERENCE);
99 104
100 // Read the address of the word containing the target_address in an 105 // Read the address of the word containing the target_address in an
101 // instruction stream. 106 // instruction stream.
102 // The only architecture-independent user of this function is the serializer. 107 // The only architecture-independent user of this function is the serializer.
103 // The serializer uses it to find out how many raw bytes of instruction to 108 // The serializer uses it to find out how many raw bytes of instruction to
104 // output before the next target. 109 // output before the next target.
105 // For an instruction like LIS/ORI where the target bits are mixed into the 110 // For an instruction like LIS/ORI where the target bits are mixed into the
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return pc + kCallTargetAddressOffset; 149 return pc + kCallTargetAddressOffset;
145 } 150 }
146 151
147 Handle<Object> Assembler::code_target_object_handle_at(Address pc) { 152 Handle<Object> Assembler::code_target_object_handle_at(Address pc) {
148 SixByteInstr instr = 153 SixByteInstr instr =
149 Instruction::InstructionBits(reinterpret_cast<const byte*>(pc)); 154 Instruction::InstructionBits(reinterpret_cast<const byte*>(pc));
150 int index = instr & 0xFFFFFFFF; 155 int index = instr & 0xFFFFFFFF;
151 return code_targets_[index]; 156 return code_targets_[index];
152 } 157 }
153 158
159 void RelocInfo::update_wasm_memory_reference(
160 Address old_base, Address new_base, size_t old_size, size_t new_size,
161 ICacheFlushMode icache_flush_mode) {
162 DCHECK(IsWasmMemoryReference(rmode_));
163 DCHECK(old_base <= wasm_memory_reference() &&
164 wasm_memory_reference() < old_base + old_size);
165 Address updated_reference = new_base + (wasm_memory_reference() - old_base);
166 DCHECK(new_base <= updated_reference &&
167 updated_reference < new_base + new_size);
168 Assembler::set_target_address_at(isolate_, pc_, host_, updated_reference,
169 icache_flush_mode);
170 }
171
154 Object* RelocInfo::target_object() { 172 Object* RelocInfo::target_object() {
155 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 173 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
156 return reinterpret_cast<Object*>(Assembler::target_address_at(pc_, host_)); 174 return reinterpret_cast<Object*>(Assembler::target_address_at(pc_, host_));
157 } 175 }
158 176
159 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { 177 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) {
160 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 178 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
161 if (rmode_ == EMBEDDED_OBJECT) { 179 if (rmode_ == EMBEDDED_OBJECT) {
162 return Handle<Object>( 180 return Handle<Object>(
163 reinterpret_cast<Object**>(Assembler::target_address_at(pc_, host_))); 181 reinterpret_cast<Object**>(Assembler::target_address_at(pc_, host_)));
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 } 584 }
567 #endif 585 #endif
568 } 586 }
569 if (!patched) UNREACHABLE(); 587 if (!patched) UNREACHABLE();
570 } 588 }
571 589
572 } // namespace internal 590 } // namespace internal
573 } // namespace v8 591 } // namespace v8
574 592
575 #endif // V8_S390_ASSEMBLER_S390_INL_H_ 593 #endif // V8_S390_ASSEMBLER_S390_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698