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/zone-containers.h" | 10 #include "src/zone/zone-containers.h" |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 x, y, kSimdPrefix, kExprI32x4ReplaceLane & 0xff, static_cast<byte>(lane) | 643 x, y, kSimdPrefix, kExprI32x4ReplaceLane & 0xff, static_cast<byte>(lane) |
644 #define WASM_SIMD_I32x4_FROM_F32x4(x) \ | 644 #define WASM_SIMD_I32x4_FROM_F32x4(x) \ |
645 x, kSimdPrefix, kExprI32x4SConvertF32x4 & 0xff | 645 x, kSimdPrefix, kExprI32x4SConvertF32x4 & 0xff |
646 #define WASM_SIMD_U32x4_FROM_F32x4(x) \ | 646 #define WASM_SIMD_U32x4_FROM_F32x4(x) \ |
647 x, kSimdPrefix, kExprI32x4UConvertF32x4 & 0xff | 647 x, kSimdPrefix, kExprI32x4UConvertF32x4 & 0xff |
648 #define WASM_SIMD_S32x4_SELECT(x, y, z) \ | 648 #define WASM_SIMD_S32x4_SELECT(x, y, z) \ |
649 x, y, z, kSimdPrefix, kExprS32x4Select & 0xff | 649 x, y, z, kSimdPrefix, kExprS32x4Select & 0xff |
650 #define WASM_SIMD_I32x4_ADD(x, y) x, y, kSimdPrefix, kExprI32x4Add & 0xff | 650 #define WASM_SIMD_I32x4_ADD(x, y) x, y, kSimdPrefix, kExprI32x4Add & 0xff |
651 #define WASM_SIMD_I32x4_SUB(x, y) x, y, kSimdPrefix, kExprI32x4Sub & 0xff | 651 #define WASM_SIMD_I32x4_SUB(x, y) x, y, kSimdPrefix, kExprI32x4Sub & 0xff |
652 | 652 |
| 653 #define WASM_SIMD_I16x8_SPLAT(x) x, kSimdPrefix, kExprI16x8Splat & 0xff |
| 654 #define WASM_SIMD_I16x8_EXTRACT_LANE(lane, x) \ |
| 655 x, kSimdPrefix, kExprI16x8ExtractLane & 0xff, static_cast<byte>(lane) |
| 656 #define WASM_SIMD_I16x8_REPLACE_LANE(lane, x, y) \ |
| 657 x, y, kSimdPrefix, kExprI16x8ReplaceLane & 0xff, static_cast<byte>(lane) |
| 658 |
| 659 #define WASM_SIMD_I8x16_SPLAT(x) x, kSimdPrefix, kExprI8x16Splat & 0xff |
| 660 #define WASM_SIMD_I8x16_EXTRACT_LANE(lane, x) \ |
| 661 x, kSimdPrefix, kExprI8x16ExtractLane & 0xff, static_cast<byte>(lane) |
| 662 #define WASM_SIMD_I8x16_REPLACE_LANE(lane, x, y) \ |
| 663 x, y, kSimdPrefix, kExprI8x16ReplaceLane & 0xff, static_cast<byte>(lane) |
| 664 |
653 #define SIG_ENTRY_v_v kWasmFunctionTypeForm, 0, 0 | 665 #define SIG_ENTRY_v_v kWasmFunctionTypeForm, 0, 0 |
654 #define SIZEOF_SIG_ENTRY_v_v 3 | 666 #define SIZEOF_SIG_ENTRY_v_v 3 |
655 | 667 |
656 #define SIG_ENTRY_v_x(a) kWasmFunctionTypeForm, 1, a, 0 | 668 #define SIG_ENTRY_v_x(a) kWasmFunctionTypeForm, 1, a, 0 |
657 #define SIG_ENTRY_v_xx(a, b) kWasmFunctionTypeForm, 2, a, b, 0 | 669 #define SIG_ENTRY_v_xx(a, b) kWasmFunctionTypeForm, 2, a, b, 0 |
658 #define SIG_ENTRY_v_xxx(a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 0 | 670 #define SIG_ENTRY_v_xxx(a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 0 |
659 #define SIZEOF_SIG_ENTRY_v_x 4 | 671 #define SIZEOF_SIG_ENTRY_v_x 4 |
660 #define SIZEOF_SIG_ENTRY_v_xx 5 | 672 #define SIZEOF_SIG_ENTRY_v_xx 5 |
661 #define SIZEOF_SIG_ENTRY_v_xxx 6 | 673 #define SIZEOF_SIG_ENTRY_v_xxx 6 |
662 | 674 |
663 #define SIG_ENTRY_x(r) kWasmFunctionTypeForm, 0, 1, r | 675 #define SIG_ENTRY_x(r) kWasmFunctionTypeForm, 0, 1, r |
664 #define SIG_ENTRY_x_x(r, a) kWasmFunctionTypeForm, 1, a, 1, r | 676 #define SIG_ENTRY_x_x(r, a) kWasmFunctionTypeForm, 1, a, 1, r |
665 #define SIG_ENTRY_x_xx(r, a, b) kWasmFunctionTypeForm, 2, a, b, 1, r | 677 #define SIG_ENTRY_x_xx(r, a, b) kWasmFunctionTypeForm, 2, a, b, 1, r |
666 #define SIG_ENTRY_x_xxx(r, a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 1, r | 678 #define SIG_ENTRY_x_xxx(r, a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 1, r |
667 #define SIZEOF_SIG_ENTRY_x 4 | 679 #define SIZEOF_SIG_ENTRY_x 4 |
668 #define SIZEOF_SIG_ENTRY_x_x 5 | 680 #define SIZEOF_SIG_ENTRY_x_x 5 |
669 #define SIZEOF_SIG_ENTRY_x_xx 6 | 681 #define SIZEOF_SIG_ENTRY_x_xx 6 |
670 #define SIZEOF_SIG_ENTRY_x_xxx 7 | 682 #define SIZEOF_SIG_ENTRY_x_xxx 7 |
671 | 683 |
672 #define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth) | 684 #define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth) |
673 #define WASM_BRV_IF(depth, val, cond) \ | 685 #define WASM_BRV_IF(depth, val, cond) \ |
674 val, cond, kExprBrIf, static_cast<byte>(depth) | 686 val, cond, kExprBrIf, static_cast<byte>(depth) |
675 #define WASM_BRV_IFD(depth, val, cond) \ | 687 #define WASM_BRV_IFD(depth, val, cond) \ |
676 val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop | 688 val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop |
677 #define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd | 689 #define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd |
678 #define WASM_BR_TABLEV(val, key, count, ...) \ | 690 #define WASM_BR_TABLEV(val, key, count, ...) \ |
679 val, key, kExprBrTable, U32V_1(count), __VA_ARGS__ | 691 val, key, kExprBrTable, U32V_1(count), __VA_ARGS__ |
680 | 692 |
681 #endif // V8_WASM_MACRO_GEN_H_ | 693 #endif // V8_WASM_MACRO_GEN_H_ |
OLD | NEW |