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

Side by Side Diff: src/x87/assembler-x87.cc

Issue 2100393003: X87: [wasm] Separate compilation from instantiation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 Address RelocInfo::wasm_global_reference() { 109 Address RelocInfo::wasm_global_reference() {
110 DCHECK(IsWasmGlobalReference(rmode_)); 110 DCHECK(IsWasmGlobalReference(rmode_));
111 return Memory::Address_at(pc_); 111 return Memory::Address_at(pc_);
112 } 112 }
113 113
114 uint32_t RelocInfo::wasm_memory_size_reference() { 114 uint32_t RelocInfo::wasm_memory_size_reference() {
115 DCHECK(IsWasmMemorySizeReference(rmode_)); 115 DCHECK(IsWasmMemorySizeReference(rmode_));
116 return Memory::uint32_at(pc_); 116 return Memory::uint32_at(pc_);
117 } 117 }
118 118
119 void RelocInfo::update_wasm_memory_reference( 119 void RelocInfo::unchecked_update_wasm_memory_reference(
120 Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, 120 Address address, ICacheFlushMode flush_mode) {
121 ICacheFlushMode icache_flush_mode) { 121 Memory::Address_at(pc_) = address;
122 DCHECK(IsWasmMemoryReference(rmode_) || IsWasmMemorySizeReference(rmode_));
123 if (IsWasmMemoryReference(rmode_)) {
124 Address updated_reference;
125 DCHECK(old_base <= wasm_memory_reference() &&
126 wasm_memory_reference() < old_base + old_size);
127 updated_reference = new_base + (wasm_memory_reference() - old_base);
128 DCHECK(new_base <= updated_reference &&
129 updated_reference < new_base + new_size);
130 Memory::Address_at(pc_) = updated_reference;
131 } else if (IsWasmMemorySizeReference(rmode_)) {
132 uint32_t updated_size_reference;
133 DCHECK(wasm_memory_size_reference() <= old_size);
134 updated_size_reference =
135 new_size + (wasm_memory_size_reference() - old_size);
136 DCHECK(updated_size_reference <= new_size);
137 Memory::uint32_at(pc_) = updated_size_reference;
138 } else {
139 UNREACHABLE();
140 }
141 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
142 Assembler::FlushICache(isolate_, pc_, sizeof(int32_t));
143 }
144 } 122 }
145 123
146 void RelocInfo::update_wasm_global_reference( 124 void RelocInfo::unchecked_update_wasm_memory_size(uint32_t size,
147 Address old_base, Address new_base, ICacheFlushMode icache_flush_mode) { 125 ICacheFlushMode flush_mode) {
148 DCHECK(IsWasmGlobalReference(rmode_)); 126 Memory::uint32_at(pc_) = size;
149 Address updated_reference;
150 DCHECK(old_base <= wasm_global_reference());
151 updated_reference = new_base + (wasm_global_reference() - old_base);
152 DCHECK(new_base <= updated_reference);
153 Memory::Address_at(pc_) = updated_reference;
154 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
155 Assembler::FlushICache(isolate_, pc_, sizeof(int32_t));
156 }
157 } 127 }
158 128
159 // ----------------------------------------------------------------------------- 129 // -----------------------------------------------------------------------------
160 // Implementation of Operand 130 // Implementation of Operand
161 131
162 Operand::Operand(Register base, int32_t disp, RelocInfo::Mode rmode) { 132 Operand::Operand(Register base, int32_t disp, RelocInfo::Mode rmode) {
163 // [base + disp/r] 133 // [base + disp/r]
164 if (disp == 0 && RelocInfo::IsNone(rmode) && !base.is(ebp)) { 134 if (disp == 0 && RelocInfo::IsNone(rmode) && !base.is(ebp)) {
165 // [base] 135 // [base]
166 set_modrm(0, base); 136 set_modrm(0, base);
(...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after
2263 fflush(coverage_log); 2233 fflush(coverage_log);
2264 } 2234 }
2265 } 2235 }
2266 2236
2267 #endif 2237 #endif
2268 2238
2269 } // namespace internal 2239 } // namespace internal
2270 } // namespace v8 2240 } // namespace v8
2271 2241
2272 #endif // V8_TARGET_ARCH_X87 2242 #endif // V8_TARGET_ARCH_X87
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