diff options
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/wasm.h b/src/wasm.h index 40859eefc..e2b97204b 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -481,7 +481,18 @@ enum SIMDLoadOp { LoadExtSVec32x2ToVecI64x2, LoadExtUVec32x2ToVecI64x2, Load32Zero, - Load64Zero + Load64Zero, +}; + +enum SIMDLoadStoreLaneOp { + LoadLaneVec8x16, + LoadLaneVec16x8, + LoadLaneVec32x4, + LoadLaneVec64x2, + StoreLaneVec8x16, + StoreLaneVec16x8, + StoreLaneVec32x4, + StoreLaneVec64x2, }; enum SIMDTernaryOp { Bitselect, QFMAF32x4, QFMSF32x4, QFMAF64x2, QFMSF64x2 }; @@ -545,6 +556,7 @@ public: SIMDTernaryId, SIMDShiftId, SIMDLoadId, + SIMDLoadStoreLaneId, MemoryInitId, DataDropId, MemoryCopyId, @@ -970,6 +982,25 @@ public: void finalize(); }; +class SIMDLoadStoreLane + : public SpecificExpression<Expression::SIMDLoadStoreLaneId> { +public: + SIMDLoadStoreLane() = default; + SIMDLoadStoreLane(MixedArena& allocator) {} + + SIMDLoadStoreLaneOp op; + Address offset; + Address align; + uint8_t index; + Expression* ptr; + Expression* vec; + + bool isStore(); + bool isLoad() { return !isStore(); } + Index getMemBytes(); + void finalize(); +}; + class MemoryInit : public SpecificExpression<Expression::MemoryInitId> { public: MemoryInit() = default; |