This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fixed disassembler not knowing about new brlist operand
ClosedPublic

Authored by aardappel on Jan 2 2019, 3:35 PM.

Details

Summary

The previously introduced new operand type for br_table didn't have
a disassembler implementation, causing an assert.

Diff Detail

Repository
rL LLVM

Event Timeline

aardappel created this revision.Jan 2 2019, 3:35 PM
aheejin accepted this revision.Jan 2 2019, 4:51 PM

LGTM with nits

lib/Target/WebAssembly/WebAssemblyInstrControl.td
45 ↗(On Diff #179952)

Nit: double space

utils/TableGen/WebAssemblyDisassemblerEmitter.cpp
95 ↗(On Diff #179952)

How is this related?

This revision is now accepted and ready to land.Jan 2 2019, 4:51 PM
aardappel updated this revision to Diff 180138.Jan 3 2019, 2:08 PM
aardappel marked 3 inline comments as done.

Nit

utils/TableGen/WebAssemblyDisassemblerEmitter.cpp
95 ↗(On Diff #179952)

The original problem was triggered by the disassembler asserting on OPERAND_UNKNOWN when trying to disassemble br_table. There shouldn't really ever be any OPERAND_UNKNOWN in the operand table. If this assert had been here before, I would have caught this problem at build time rather than at runtime.

This revision was automatically updated to reflect the committed changes.