diff options
author | lizhengxing <unixhaha@gmail.com> | 2018-03-13 11:18:34 -0700 |
---|---|---|
committer | Ben Smith <binjimin@gmail.com> | 2018-03-13 11:18:34 -0700 |
commit | 0652fa7e6cd1a8413ad5088d005865f48905de7f (patch) | |
tree | 2770b41dc98be019cebc5af71f9d76347d0cb459 /src/binary-reader-interp.cc | |
parent | ba6b56615d9a70da1a28c0d749f586405f2c7e6b (diff) | |
download | wabt-0652fa7e6cd1a8413ad5088d005865f48905de7f.tar.gz wabt-0652fa7e6cd1a8413ad5088d005865f48905de7f.tar.bz2 wabt-0652fa7e6cd1a8413ad5088d005865f48905de7f.zip |
Simd i8x16.extract_lane_s instruction implementation. (#802)
Including:
1. All necessary code for SIMD lanes accessing.
2. i8x16.extract_lane_s implementation.
Diffstat (limited to 'src/binary-reader-interp.cc')
-rw-r--r-- | src/binary-reader-interp.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/binary-reader-interp.cc b/src/binary-reader-interp.cc index b8907458..c8fcc6e1 100644 --- a/src/binary-reader-interp.cc +++ b/src/binary-reader-interp.cc @@ -195,6 +195,7 @@ class BinaryReaderInterp : public BinaryReaderNop { wabt::Result OnTernaryExpr(wabt::Opcode opcode) override; wabt::Result OnUnreachableExpr() override; wabt::Result EndFunctionBody(Index index) override; + wabt::Result OnSimdLaneOpExpr(wabt::Opcode opcode, uint64_t value) override; wabt::Result EndElemSegmentInitExpr(Index index) override; wabt::Result OnElemSegmentFunctionIndexCount(Index index, @@ -1179,6 +1180,14 @@ wabt::Result BinaryReaderInterp::OnTernaryExpr(wabt::Opcode opcode) { return wabt::Result::Ok; } +wabt::Result BinaryReaderInterp::OnSimdLaneOpExpr(wabt::Opcode opcode, + uint64_t value) { + CHECK_RESULT(typechecker_.OnSimdLaneOp(opcode, value)); + CHECK_RESULT(EmitOpcode(opcode)); + CHECK_RESULT(EmitI8(static_cast<uint8_t>(value))); + return wabt::Result::Ok; +} + wabt::Result BinaryReaderInterp::OnAtomicLoadExpr(Opcode opcode, uint32_t alignment_log2, Address offset) { |