diff options
author | Sam Clegg <sbc@chromium.org> | 2021-12-08 14:36:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-08 14:36:16 -0800 |
commit | e2791796f660a58f62623af70919509723f30506 (patch) | |
tree | 46fdac8f0c450ad9c86fc5466451d4180ff7d938 /src/binary-reader-objdump.cc | |
parent | dd1c78d81525dd14623a6ad2e1c389e64e3c203d (diff) | |
download | wabt-e2791796f660a58f62623af70919509723f30506.tar.gz wabt-e2791796f660a58f62623af70919509723f30506.tar.bz2 wabt-e2791796f660a58f62623af70919509723f30506.zip |
wasm-objdump: Fix disassembly output of selectT instruction (#1777)
Use `LogOpcodeType` rather than LogOpcodeBare` when the select
instruction has a type.
Diffstat (limited to 'src/binary-reader-objdump.cc')
-rw-r--r-- | src/binary-reader-objdump.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc index fb4985ca..aced2738 100644 --- a/src/binary-reader-objdump.cc +++ b/src/binary-reader-objdump.cc @@ -793,7 +793,11 @@ Result BinaryReaderObjdumpDisassemble::OnOpcodeType(Type type) { return Result::Ok; } Offset immediate_len = state->offset - current_opcode_offset; - LogOpcode(immediate_len, type.GetRefKindName()); + if (current_opcode == Opcode::SelectT) { + LogOpcode(immediate_len, type.GetName()); + } else { + LogOpcode(immediate_len, type.GetRefKindName()); + } return Result::Ok; } |