OLD | NEW |
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_WASM_MACRO_GEN_H_ | 5 #ifndef V8_WASM_MACRO_GEN_H_ |
6 #define V8_WASM_MACRO_GEN_H_ | 6 #define V8_WASM_MACRO_GEN_H_ |
7 | 7 |
8 #include "src/wasm/wasm-opcodes.h" | 8 #include "src/wasm/wasm-opcodes.h" |
9 | 9 |
10 #include "src/zone-containers.h" | 10 #include "src/zone-containers.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 ZERO_ALIGNMENT, ZERO_OFFSET | 357 ZERO_ALIGNMENT, ZERO_OFFSET |
358 #define WASM_LOAD_MEM_OFFSET(type, offset, index) \ | 358 #define WASM_LOAD_MEM_OFFSET(type, offset, index) \ |
359 index, static_cast<byte>( \ | 359 index, static_cast<byte>( \ |
360 v8::internal::wasm::WasmOpcodes::LoadStoreOpcodeOf(type, false)), \ | 360 v8::internal::wasm::WasmOpcodes::LoadStoreOpcodeOf(type, false)), \ |
361 ZERO_ALIGNMENT, static_cast<byte>(offset) | 361 ZERO_ALIGNMENT, static_cast<byte>(offset) |
362 #define WASM_STORE_MEM_OFFSET(type, offset, index, val) \ | 362 #define WASM_STORE_MEM_OFFSET(type, offset, index, val) \ |
363 index, val, \ | 363 index, val, \ |
364 static_cast<byte>( \ | 364 static_cast<byte>( \ |
365 v8::internal::wasm::WasmOpcodes::LoadStoreOpcodeOf(type, true)), \ | 365 v8::internal::wasm::WasmOpcodes::LoadStoreOpcodeOf(type, true)), \ |
366 ZERO_ALIGNMENT, static_cast<byte>(offset) | 366 ZERO_ALIGNMENT, static_cast<byte>(offset) |
| 367 #define WASM_LOAD_MEM_ALIGNMENT(type, index, alignment) \ |
| 368 index, static_cast<byte>( \ |
| 369 v8::internal::wasm::WasmOpcodes::LoadStoreOpcodeOf(type, false)), \ |
| 370 alignment, ZERO_OFFSET |
| 371 #define WASM_STORE_MEM_ALIGNMENT(type, index, alignment, val) \ |
| 372 index, val, \ |
| 373 static_cast<byte>( \ |
| 374 v8::internal::wasm::WasmOpcodes::LoadStoreOpcodeOf(type, true)), \ |
| 375 alignment, ZERO_OFFSET |
367 | 376 |
368 #define WASM_CALL_FUNCTION0(index) \ | 377 #define WASM_CALL_FUNCTION0(index) \ |
369 kExprCallFunction, 0, static_cast<byte>(index) | 378 kExprCallFunction, 0, static_cast<byte>(index) |
370 #define WASM_CALL_FUNCTION1(index, a) \ | 379 #define WASM_CALL_FUNCTION1(index, a) \ |
371 a, kExprCallFunction, 1, static_cast<byte>(index) | 380 a, kExprCallFunction, 1, static_cast<byte>(index) |
372 #define WASM_CALL_FUNCTION2(index, a, b) \ | 381 #define WASM_CALL_FUNCTION2(index, a, b) \ |
373 a, b, kExprCallFunction, 2, static_cast<byte>(index) | 382 a, b, kExprCallFunction, 2, static_cast<byte>(index) |
374 #define WASM_CALL_FUNCTION3(index, a, b, c) \ | 383 #define WASM_CALL_FUNCTION3(index, a, b, c) \ |
375 a, b, c, kExprCallFunction, 3, static_cast<byte>(index) | 384 a, b, c, kExprCallFunction, 3, static_cast<byte>(index) |
376 #define WASM_CALL_FUNCTION4(index, a, b, c, d) \ | 385 #define WASM_CALL_FUNCTION4(index, a, b, c, d) \ |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 #define SIG_ENTRY_x(r) kWasmFunctionTypeForm, 0, 1, r | 592 #define SIG_ENTRY_x(r) kWasmFunctionTypeForm, 0, 1, r |
584 #define SIG_ENTRY_x_x(r, a) kWasmFunctionTypeForm, 1, a, 1, r | 593 #define SIG_ENTRY_x_x(r, a) kWasmFunctionTypeForm, 1, a, 1, r |
585 #define SIG_ENTRY_x_xx(r, a, b) kWasmFunctionTypeForm, 2, a, b, 1, r | 594 #define SIG_ENTRY_x_xx(r, a, b) kWasmFunctionTypeForm, 2, a, b, 1, r |
586 #define SIG_ENTRY_x_xxx(r, a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 1, r | 595 #define SIG_ENTRY_x_xxx(r, a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 1, r |
587 #define SIZEOF_SIG_ENTRY_x 4 | 596 #define SIZEOF_SIG_ENTRY_x 4 |
588 #define SIZEOF_SIG_ENTRY_x_x 5 | 597 #define SIZEOF_SIG_ENTRY_x_x 5 |
589 #define SIZEOF_SIG_ENTRY_x_xx 6 | 598 #define SIZEOF_SIG_ENTRY_x_xx 6 |
590 #define SIZEOF_SIG_ENTRY_x_xxx 7 | 599 #define SIZEOF_SIG_ENTRY_x_xxx 7 |
591 | 600 |
592 #endif // V8_WASM_MACRO_GEN_H_ | 601 #endif // V8_WASM_MACRO_GEN_H_ |
OLD | NEW |