Chromium Code Reviews| 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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 614 | 614 |
| 615 //------------------------------------------------------------------------------ | 615 //------------------------------------------------------------------------------ |
| 616 // Memory Operations. | 616 // Memory Operations. |
| 617 //------------------------------------------------------------------------------ | 617 //------------------------------------------------------------------------------ |
| 618 #define WASM_GROW_MEMORY(x) x, kExprGrowMemory, 0 | 618 #define WASM_GROW_MEMORY(x) x, kExprGrowMemory, 0 |
| 619 #define WASM_MEMORY_SIZE kExprMemorySize, 0 | 619 #define WASM_MEMORY_SIZE kExprMemorySize, 0 |
| 620 | 620 |
| 621 //------------------------------------------------------------------------------ | 621 //------------------------------------------------------------------------------ |
| 622 // Simd Operations. | 622 // Simd Operations. |
| 623 //------------------------------------------------------------------------------ | 623 //------------------------------------------------------------------------------ |
| 624 #define WASM_SIMD_F32x4_SPLAT(x) x, kSimdPrefix, kExprF32x4Splat & 0xff | |
| 625 #define WASM_SIMD_F32x4_EXTRACT_LANE(lane, x) \ | |
| 626 x, kSimdPrefix, kExprF32x4ExtractLane & 0xff, static_cast<byte>(lane) | |
| 627 #define WASM_SIMD_F32x4_REPLACE_LANE(lane, x, y) \ | |
| 628 x, y, kSimdPrefix, kExprF32x4ReplaceLane & 0xff, static_cast<byte>(lane) | |
| 629 #define WASM_SIMD_F32x4_FROM_INT32x4(x) \ | |
| 630 x, kSimdPrefix, kExprF32x4FromInt32x4 & 0xff | |
| 631 #define WASM_SIMD_F32x4_FROM_UINT32x4(x) \ | |
| 632 x, kSimdPrefix, kExprF32x4FromUint32x4 & 0xff | |
| 633 #define WASM_SIMD_F32x4_ADD(x, y) x, y, kSimdPrefix, kExprF32x4Add & 0xff | |
| 634 #define WASM_SIMD_F32x4_SUB(x, y) x, y, kSimdPrefix, kExprF32x4Sub & 0xff | |
| 635 | |
| 624 #define WASM_SIMD_I32x4_SPLAT(x) x, kSimdPrefix, kExprI32x4Splat & 0xff | 636 #define WASM_SIMD_I32x4_SPLAT(x) x, kSimdPrefix, kExprI32x4Splat & 0xff |
| 625 #define WASM_SIMD_I32x4_EXTRACT_LANE(lane, x) \ | 637 #define WASM_SIMD_I32x4_EXTRACT_LANE(lane, x) \ |
| 626 x, kSimdPrefix, kExprI32x4ExtractLane & 0xff, static_cast<byte>(lane) | 638 x, kSimdPrefix, kExprI32x4ExtractLane & 0xff, static_cast<byte>(lane) |
| 627 #define WASM_SIMD_I32x4_REPLACE_LANE(lane, x, y) \ | 639 #define WASM_SIMD_I32x4_REPLACE_LANE(lane, x, y) \ |
| 628 x, y, kSimdPrefix, kExprI32x4ReplaceLane & 0xff, static_cast<byte>(lane) | 640 x, y, kSimdPrefix, kExprI32x4ReplaceLane & 0xff, static_cast<byte>(lane) |
| 641 #define WASM_SIMD_I32x4_FROM_FLOAT32x4(x) \ | |
| 642 x, kSimdPrefix, kExprI32x4FromFloat32x4 & 0xff | |
| 643 #define WASM_SIMD_UI32x4_FROM_FLOAT32x4(x) \ | |
|
gdeepti
2016/12/16 23:35:24
Nit: The convention for unsigned values in this fi
bbudge
2016/12/17 01:51:05
Thanks, I noticed a bunch of similar cases here. D
| |
| 644 x, kSimdPrefix, kExprUi32x4FromFloat32x4 & 0xff | |
| 629 #define WASM_SIMD_I32x4_ADD(x, y) x, y, kSimdPrefix, kExprI32x4Add & 0xff | 645 #define WASM_SIMD_I32x4_ADD(x, y) x, y, kSimdPrefix, kExprI32x4Add & 0xff |
| 630 #define WASM_SIMD_I32x4_SUB(x, y) x, y, kSimdPrefix, kExprI32x4Sub & 0xff | 646 #define WASM_SIMD_I32x4_SUB(x, y) x, y, kSimdPrefix, kExprI32x4Sub & 0xff |
| 631 #define WASM_SIMD_F32x4_SPLAT(x) x, kSimdPrefix, kExprF32x4Splat & 0xff | 647 #define WASM_SIMD_I32x4_EQUAL(x, y) x, y, kSimdPrefix, kExprI32x4Eq & 0xff |
| 632 #define WASM_SIMD_F32x4_EXTRACT_LANE(lane, x) \ | 648 #define WASM_SIMD_I32x4_NOT_EQUAL(x, y) x, y, kSimdPrefix, kExprI32x4Ne & 0xff |
| 633 x, kSimdPrefix, kExprF32x4ExtractLane & 0xff, static_cast<byte>(lane) | 649 #define WASM_SIMD_32x4_SELECT(x, y, z) \ |
| 634 #define WASM_SIMD_F32x4_ADD(x, y) x, y, kSimdPrefix, kExprF32x4Add & 0xff | 650 x, y, z, kSimdPrefix, kExprS32x4Select & 0xff |
| 635 #define WASM_SIMD_F32x4_REPLACE_LANE(lane, x, y) \ | |
| 636 x, y, kSimdPrefix, kExprF32x4ReplaceLane & 0xff, static_cast<byte>(lane) | |
| 637 | 651 |
| 638 #define SIG_ENTRY_v_v kWasmFunctionTypeForm, 0, 0 | 652 #define SIG_ENTRY_v_v kWasmFunctionTypeForm, 0, 0 |
| 639 #define SIZEOF_SIG_ENTRY_v_v 3 | 653 #define SIZEOF_SIG_ENTRY_v_v 3 |
| 640 | 654 |
| 641 #define SIG_ENTRY_v_x(a) kWasmFunctionTypeForm, 1, a, 0 | 655 #define SIG_ENTRY_v_x(a) kWasmFunctionTypeForm, 1, a, 0 |
| 642 #define SIG_ENTRY_v_xx(a, b) kWasmFunctionTypeForm, 2, a, b, 0 | 656 #define SIG_ENTRY_v_xx(a, b) kWasmFunctionTypeForm, 2, a, b, 0 |
| 643 #define SIG_ENTRY_v_xxx(a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 0 | 657 #define SIG_ENTRY_v_xxx(a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 0 |
| 644 #define SIZEOF_SIG_ENTRY_v_x 4 | 658 #define SIZEOF_SIG_ENTRY_v_x 4 |
| 645 #define SIZEOF_SIG_ENTRY_v_xx 5 | 659 #define SIZEOF_SIG_ENTRY_v_xx 5 |
| 646 #define SIZEOF_SIG_ENTRY_v_xxx 6 | 660 #define SIZEOF_SIG_ENTRY_v_xxx 6 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 657 #define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth) | 671 #define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth) |
| 658 #define WASM_BRV_IF(depth, val, cond) \ | 672 #define WASM_BRV_IF(depth, val, cond) \ |
| 659 val, cond, kExprBrIf, static_cast<byte>(depth) | 673 val, cond, kExprBrIf, static_cast<byte>(depth) |
| 660 #define WASM_BRV_IFD(depth, val, cond) \ | 674 #define WASM_BRV_IFD(depth, val, cond) \ |
| 661 val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop | 675 val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop |
| 662 #define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd | 676 #define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd |
| 663 #define WASM_BR_TABLEV(val, key, count, ...) \ | 677 #define WASM_BR_TABLEV(val, key, count, ...) \ |
| 664 val, key, kExprBrTable, U32V_1(count), __VA_ARGS__ | 678 val, key, kExprBrTable, U32V_1(count), __VA_ARGS__ |
| 665 | 679 |
| 666 #endif // V8_WASM_MACRO_GEN_H_ | 680 #endif // V8_WASM_MACRO_GEN_H_ |
| OLD | NEW |