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

Side by Side Diff: src/ia32/assembler-ia32-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 | « src/ia32/assembler-ia32.h ('k') | src/mips/assembler-mips-inl.h » ('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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 *p += delta; // Relocate entry. 74 *p += delta; // Relocate entry.
75 } 75 }
76 } 76 }
77 77
78 78
79 Address RelocInfo::target_address() { 79 Address RelocInfo::target_address() {
80 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); 80 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_));
81 return Assembler::target_address_at(pc_, host_); 81 return Assembler::target_address_at(pc_, host_);
82 } 82 }
83 83
84 Address RelocInfo::wasm_memory_reference() {
85 DCHECK(IsWasmMemoryReference(rmode_));
86 return Memory::Address_at(pc_);
87 }
88 84
89 Address RelocInfo::target_address_address() { 85 Address RelocInfo::target_address_address() {
90 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) 86 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)
91 || rmode_ == EMBEDDED_OBJECT 87 || rmode_ == EMBEDDED_OBJECT
92 || rmode_ == EXTERNAL_REFERENCE); 88 || rmode_ == EXTERNAL_REFERENCE);
93 return reinterpret_cast<Address>(pc_); 89 return reinterpret_cast<Address>(pc_);
94 } 90 }
95 91
96 92
97 Address RelocInfo::constant_pool_entry_address() { 93 Address RelocInfo::constant_pool_entry_address() {
(...skipping 14 matching lines...) Expand all
112 icache_flush_mode); 108 icache_flush_mode);
113 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); 109 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_));
114 if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL && 110 if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL &&
115 IsCodeTarget(rmode_)) { 111 IsCodeTarget(rmode_)) {
116 Object* target_code = Code::GetCodeFromTargetAddress(target); 112 Object* target_code = Code::GetCodeFromTargetAddress(target);
117 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( 113 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(
118 host(), this, HeapObject::cast(target_code)); 114 host(), this, HeapObject::cast(target_code));
119 } 115 }
120 } 116 }
121 117
122 void RelocInfo::update_wasm_memory_reference(
123 Address old_base, Address new_base, size_t old_size, size_t new_size,
124 ICacheFlushMode icache_flush_mode) {
125 DCHECK(IsWasmMemoryReference(rmode_));
126 DCHECK(old_base <= wasm_memory_reference() &&
127 wasm_memory_reference() < old_base + old_size);
128 Address updated_reference = new_base + (wasm_memory_reference() - old_base);
129 DCHECK(new_base <= updated_reference &&
130 updated_reference < new_base + new_size);
131 Memory::Address_at(pc_) = updated_reference;
132 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
133 Assembler::FlushICache(isolate_, pc_, sizeof(int32_t));
134 }
135 }
136 118
137 Object* RelocInfo::target_object() { 119 Object* RelocInfo::target_object() {
138 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 120 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
139 return Memory::Object_at(pc_); 121 return Memory::Object_at(pc_);
140 } 122 }
141 123
142 124
143 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { 125 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) {
144 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 126 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
145 return Memory::Object_Handle_at(pc_); 127 return Memory::Object_Handle_at(pc_);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 314 }
333 } 315 }
334 316
335 317
336 318
337 Immediate::Immediate(int x) { 319 Immediate::Immediate(int x) {
338 x_ = x; 320 x_ = x;
339 rmode_ = RelocInfo::NONE32; 321 rmode_ = RelocInfo::NONE32;
340 } 322 }
341 323
342 Immediate::Immediate(Address x, RelocInfo::Mode rmode) {
343 x_ = reinterpret_cast<int32_t>(x);
344 rmode_ = rmode;
345 }
346 324
347 Immediate::Immediate(const ExternalReference& ext) { 325 Immediate::Immediate(const ExternalReference& ext) {
348 x_ = reinterpret_cast<int32_t>(ext.address()); 326 x_ = reinterpret_cast<int32_t>(ext.address());
349 rmode_ = RelocInfo::EXTERNAL_REFERENCE; 327 rmode_ = RelocInfo::EXTERNAL_REFERENCE;
350 } 328 }
351 329
352 330
353 Immediate::Immediate(Label* internal_offset) { 331 Immediate::Immediate(Label* internal_offset) {
354 x_ = reinterpret_cast<int32_t>(internal_offset); 332 x_ = reinterpret_cast<int32_t>(internal_offset);
355 rmode_ = RelocInfo::INTERNAL_REFERENCE; 333 rmode_ = RelocInfo::INTERNAL_REFERENCE;
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 546
569 Operand::Operand(Immediate imm) { 547 Operand::Operand(Immediate imm) {
570 // [disp/r] 548 // [disp/r]
571 set_modrm(0, ebp); 549 set_modrm(0, ebp);
572 set_dispr(imm.x_, imm.rmode_); 550 set_dispr(imm.x_, imm.rmode_);
573 } 551 }
574 } // namespace internal 552 } // namespace internal
575 } // namespace v8 553 } // namespace v8
576 554
577 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ 555 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/mips/assembler-mips-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698