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

Side by Side Diff: src/compiler/wasm-compiler.h

Issue 2122853002: Implement UnaligedLoad and UnaligedStore turbofan operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add UnalingedLoad and UnalignedStore tests 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_WASM_COMPILER_H_ 5 #ifndef V8_COMPILER_WASM_COMPILER_H_
6 #define V8_COMPILER_WASM_COMPILER_H_ 6 #define V8_COMPILER_WASM_COMPILER_H_
7 7
8 // Clients of this interface shouldn't depend on lots of compiler internals. 8 // Clients of this interface shouldn't depend on lots of compiler internals.
9 // Do not include anything from src/compiler here! 9 // Do not include anything from src/compiler here!
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 // Internal helper methods. 217 // Internal helper methods.
218 JSGraph* jsgraph() { return jsgraph_; } 218 JSGraph* jsgraph() { return jsgraph_; }
219 Graph* graph(); 219 Graph* graph();
220 220
221 Node* String(const char* string); 221 Node* String(const char* string);
222 Node* MemBuffer(uint32_t offset); 222 Node* MemBuffer(uint32_t offset);
223 void BoundsCheckMem(MachineType memtype, Node* index, uint32_t offset, 223 void BoundsCheckMem(MachineType memtype, Node* index, uint32_t offset,
224 wasm::WasmCodePosition position); 224 wasm::WasmCodePosition position);
225 225
226 MachineType GetTypeForUnalignedAccess(uint32_t alignment,
227 bool signExtend = false);
228
229 Node* GetUnalignedLoadOffsetNode(Node* baseOffset, int numberOfBytes,
230 int stride, int current);
231
232 Node* BuildUnalignedLoad(wasm::LocalType type, MachineType memtype,
233 Node* index, uint32_t offset, uint32_t alignment);
234 Node* GetUnalignedStoreOffsetNode(Node* baseOffset, int numberOfBytes,
235 int stride, int current);
236 Node* BuildUnalignedStore(MachineType memtype, Node* index, uint32_t offset,
237 uint32_t alignment, Node* val);
238
239 Node* BuildChangeEndianness(Node* node, MachineType type, 226 Node* BuildChangeEndianness(Node* node, MachineType type,
240 wasm::LocalType wasmtype = wasm::kAstStmt); 227 wasm::LocalType wasmtype = wasm::kAstStmt);
241 228
242 Node* MaskShiftCount32(Node* node); 229 Node* MaskShiftCount32(Node* node);
243 Node* MaskShiftCount64(Node* node); 230 Node* MaskShiftCount64(Node* node);
244 231
245 Node* BuildCCall(MachineSignature* sig, Node** args); 232 Node* BuildCCall(MachineSignature* sig, Node** args);
246 Node* BuildWasmCall(wasm::FunctionSig* sig, Node** args, 233 Node* BuildWasmCall(wasm::FunctionSig* sig, Node** args,
247 wasm::WasmCodePosition position); 234 wasm::WasmCodePosition position);
248 235
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 Node** buf = Buffer(new_count); 334 Node** buf = Buffer(new_count);
348 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); 335 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*));
349 return buf; 336 return buf;
350 } 337 }
351 }; 338 };
352 } // namespace compiler 339 } // namespace compiler
353 } // namespace internal 340 } // namespace internal
354 } // namespace v8 341 } // namespace v8
355 342
356 #endif // V8_COMPILER_WASM_COMPILER_H_ 343 #endif // V8_COMPILER_WASM_COMPILER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698