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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 //------------------------------------------------------------------------------ | 582 //------------------------------------------------------------------------------ |
583 // Memory Operations. | 583 // Memory Operations. |
584 //------------------------------------------------------------------------------ | 584 //------------------------------------------------------------------------------ |
585 #define WASM_GROW_MEMORY(x) x, kExprGrowMemory | 585 #define WASM_GROW_MEMORY(x) x, kExprGrowMemory |
586 #define WASM_MEMORY_SIZE kExprMemorySize | 586 #define WASM_MEMORY_SIZE kExprMemorySize |
587 | 587 |
588 //------------------------------------------------------------------------------ | 588 //------------------------------------------------------------------------------ |
589 // Simd Operations. | 589 // Simd Operations. |
590 //------------------------------------------------------------------------------ | 590 //------------------------------------------------------------------------------ |
591 #define WASM_SIMD_I32x4_SPLAT(x) x, kSimdPrefix, kExprI32x4Splat & 0xff | 591 #define WASM_SIMD_I32x4_SPLAT(x) x, kSimdPrefix, kExprI32x4Splat & 0xff |
592 #define WASM_SIMD_I32x4_EXTRACT_LANE(x, y) \ | 592 #define WASM_SIMD_I32x4_EXTRACT_LANE(lane, x) \ |
593 x, y, kSimdPrefix, kExprI32x4ExtractLane & 0xff | 593 x, kSimdPrefix, kExprI32x4ExtractLane & 0xff, static_cast<byte>(lane) |
594 | 594 |
595 #define SIG_ENTRY_v_v kWasmFunctionTypeForm, 0, 0 | 595 #define SIG_ENTRY_v_v kWasmFunctionTypeForm, 0, 0 |
596 #define SIZEOF_SIG_ENTRY_v_v 3 | 596 #define SIZEOF_SIG_ENTRY_v_v 3 |
597 | 597 |
598 #define SIG_ENTRY_v_x(a) kWasmFunctionTypeForm, 1, a, 0 | 598 #define SIG_ENTRY_v_x(a) kWasmFunctionTypeForm, 1, a, 0 |
599 #define SIG_ENTRY_v_xx(a, b) kWasmFunctionTypeForm, 2, a, b, 0 | 599 #define SIG_ENTRY_v_xx(a, b) kWasmFunctionTypeForm, 2, a, b, 0 |
600 #define SIG_ENTRY_v_xxx(a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 0 | 600 #define SIG_ENTRY_v_xxx(a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 0 |
601 #define SIZEOF_SIG_ENTRY_v_x 4 | 601 #define SIZEOF_SIG_ENTRY_v_x 4 |
602 #define SIZEOF_SIG_ENTRY_v_xx 5 | 602 #define SIZEOF_SIG_ENTRY_v_xx 5 |
603 #define SIZEOF_SIG_ENTRY_v_xxx 6 | 603 #define SIZEOF_SIG_ENTRY_v_xxx 6 |
604 | 604 |
605 #define SIG_ENTRY_x(r) kWasmFunctionTypeForm, 0, 1, r | 605 #define SIG_ENTRY_x(r) kWasmFunctionTypeForm, 0, 1, r |
606 #define SIG_ENTRY_x_x(r, a) kWasmFunctionTypeForm, 1, a, 1, r | 606 #define SIG_ENTRY_x_x(r, a) kWasmFunctionTypeForm, 1, a, 1, r |
607 #define SIG_ENTRY_x_xx(r, a, b) kWasmFunctionTypeForm, 2, a, b, 1, r | 607 #define SIG_ENTRY_x_xx(r, a, b) kWasmFunctionTypeForm, 2, a, b, 1, r |
608 #define SIG_ENTRY_x_xxx(r, a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 1, r | 608 #define SIG_ENTRY_x_xxx(r, a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 1, r |
609 #define SIZEOF_SIG_ENTRY_x 4 | 609 #define SIZEOF_SIG_ENTRY_x 4 |
610 #define SIZEOF_SIG_ENTRY_x_x 5 | 610 #define SIZEOF_SIG_ENTRY_x_x 5 |
611 #define SIZEOF_SIG_ENTRY_x_xx 6 | 611 #define SIZEOF_SIG_ENTRY_x_xx 6 |
612 #define SIZEOF_SIG_ENTRY_x_xxx 7 | 612 #define SIZEOF_SIG_ENTRY_x_xxx 7 |
613 | 613 |
614 #endif // V8_WASM_MACRO_GEN_H_ | 614 #endif // V8_WASM_MACRO_GEN_H_ |
OLD | NEW |