diff options
author | Ng Zhi An <ngzhian@gmail.com> | 2021-03-22 15:22:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-22 15:22:02 -0700 |
commit | 2c7d2572414aad39341734d1513a6cd94759a320 (patch) | |
tree | 4b71cafd0fbee7c1a4920a96b8d4e11138f7264a /src/binary-reader-logging.cc | |
parent | c7293e42c587cab2b15eaf2934f574f84eeab9e5 (diff) | |
download | wabt-2c7d2572414aad39341734d1513a6cd94759a320.tar.gz wabt-2c7d2572414aad39341734d1513a6cd94759a320.tar.bz2 wabt-2c7d2572414aad39341734d1513a6cd94759a320.zip |
[simd] Implement load lane (#1646)
This is a new kind of ir/ast node/instruction. It has 3 immediates:
memarg align, memarg offset, and lane index. This required new visitor
functions in all the places.
Drive-by cleanup to share the simd lane parsing logic between shuffle,
lane op and this new load lane instructions. This requires rebasing some
tests because the error messages are slightly different now.
Diffstat (limited to 'src/binary-reader-logging.cc')
-rw-r--r-- | src/binary-reader-logging.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/binary-reader-logging.cc b/src/binary-reader-logging.cc index c0a05fe6..a73bd177 100644 --- a/src/binary-reader-logging.cc +++ b/src/binary-reader-logging.cc @@ -395,6 +395,16 @@ Result BinaryReaderLogging::OnSimdLaneOpExpr(Opcode opcode, uint64_t value) { return reader_->OnSimdLaneOpExpr(opcode, value); } +Result BinaryReaderLogging::OnSimdLoadLaneExpr(Opcode opcode, + Address alignment_log2, + Address offset, + uint64_t value) { + LOGF("OnSimdLoadLaneExpr (align log2: %" PRIaddress ", offset: %" PRIaddress + ", lane: %" PRIu64 ")\n", + alignment_log2, offset, value); + return reader_->OnSimdLoadLaneExpr(opcode, alignment_log2, offset, value); +} + Result BinaryReaderLogging::OnSimdShuffleOpExpr(Opcode opcode, v128 value) { LOGF("OnSimdShuffleOpExpr (lane: 0x%08x %08x %08x %08x)\n", value.u32(0), value.u32(1), value.u32(2), value.u32(3)); @@ -919,6 +929,12 @@ Result BinaryReaderLogging::OnOpcodeUint32Uint32(uint32_t value, return reader_->OnOpcodeUint32Uint32(value, value2); } +Result BinaryReaderLogging::OnOpcodeUint32Uint32Uint32(uint32_t value, + uint32_t value2, + uint32_t value3) { + return reader_->OnOpcodeUint32Uint32Uint32(value, value2, value3); +} + Result BinaryReaderLogging::OnOpcodeUint64(uint64_t value) { return reader_->OnOpcodeUint64(value); } |