| 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 //------------------------------------------------------------------------------ | 607 //------------------------------------------------------------------------------ |
| 608 #define WASM_GROW_MEMORY(x) x, kExprGrowMemory | 608 #define WASM_GROW_MEMORY(x) x, kExprGrowMemory |
| 609 #define WASM_MEMORY_SIZE kExprMemorySize | 609 #define WASM_MEMORY_SIZE kExprMemorySize |
| 610 | 610 |
| 611 //------------------------------------------------------------------------------ | 611 //------------------------------------------------------------------------------ |
| 612 // Simd Operations. | 612 // Simd Operations. |
| 613 //------------------------------------------------------------------------------ | 613 //------------------------------------------------------------------------------ |
| 614 #define WASM_SIMD_I32x4_SPLAT(x) x, kSimdPrefix, kExprI32x4Splat & 0xff | 614 #define WASM_SIMD_I32x4_SPLAT(x) x, kSimdPrefix, kExprI32x4Splat & 0xff |
| 615 #define WASM_SIMD_I32x4_EXTRACT_LANE(lane, x) \ | 615 #define WASM_SIMD_I32x4_EXTRACT_LANE(lane, x) \ |
| 616 x, kSimdPrefix, kExprI32x4ExtractLane & 0xff, static_cast<byte>(lane) | 616 x, kSimdPrefix, kExprI32x4ExtractLane & 0xff, static_cast<byte>(lane) |
| 617 #define WASM_SIMD_I32x4_ADD(x, y) x, y, kSimdPrefix, kExprI32x4Add & 0xff |
| 618 #define WASM_SIMD_F32x4_SPLAT(x) x, kSimdPrefix, kExprF32x4Splat & 0xff |
| 619 #define WASM_SIMD_F32x4_EXTRACT_LANE(lane, x) \ |
| 620 x, kSimdPrefix, kExprF32x4ExtractLane & 0xff, static_cast<byte>(lane) |
| 621 #define WASM_SIMD_F32x4_ADD(x, y) x, y, kSimdPrefix, kExprF32x4Add & 0xff |
| 617 | 622 |
| 618 #define SIG_ENTRY_v_v kWasmFunctionTypeForm, 0, 0 | 623 #define SIG_ENTRY_v_v kWasmFunctionTypeForm, 0, 0 |
| 619 #define SIZEOF_SIG_ENTRY_v_v 3 | 624 #define SIZEOF_SIG_ENTRY_v_v 3 |
| 620 | 625 |
| 621 #define SIG_ENTRY_v_x(a) kWasmFunctionTypeForm, 1, a, 0 | 626 #define SIG_ENTRY_v_x(a) kWasmFunctionTypeForm, 1, a, 0 |
| 622 #define SIG_ENTRY_v_xx(a, b) kWasmFunctionTypeForm, 2, a, b, 0 | 627 #define SIG_ENTRY_v_xx(a, b) kWasmFunctionTypeForm, 2, a, b, 0 |
| 623 #define SIG_ENTRY_v_xxx(a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 0 | 628 #define SIG_ENTRY_v_xxx(a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 0 |
| 624 #define SIZEOF_SIG_ENTRY_v_x 4 | 629 #define SIZEOF_SIG_ENTRY_v_x 4 |
| 625 #define SIZEOF_SIG_ENTRY_v_xx 5 | 630 #define SIZEOF_SIG_ENTRY_v_xx 5 |
| 626 #define SIZEOF_SIG_ENTRY_v_xxx 6 | 631 #define SIZEOF_SIG_ENTRY_v_xxx 6 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 637 #define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth) | 642 #define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth) |
| 638 #define WASM_BRV_IF(depth, val, cond) \ | 643 #define WASM_BRV_IF(depth, val, cond) \ |
| 639 val, cond, kExprBrIf, static_cast<byte>(depth) | 644 val, cond, kExprBrIf, static_cast<byte>(depth) |
| 640 #define WASM_BRV_IFD(depth, val, cond) \ | 645 #define WASM_BRV_IFD(depth, val, cond) \ |
| 641 val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop | 646 val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop |
| 642 #define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd | 647 #define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd |
| 643 #define WASM_BR_TABLEV(val, key, count, ...) \ | 648 #define WASM_BR_TABLEV(val, key, count, ...) \ |
| 644 val, key, kExprBrTable, U32V_1(count), __VA_ARGS__ | 649 val, key, kExprBrTable, U32V_1(count), __VA_ARGS__ |
| 645 | 650 |
| 646 #endif // V8_WASM_MACRO_GEN_H_ | 651 #endif // V8_WASM_MACRO_GEN_H_ |
| OLD | NEW |