[PATCH] D55797: [WebAssembly] Make assembler check for proper nesting of control flow.

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 17 17:01:00 PST 2018


aardappel created this revision.
aardappel added reviewers: dschuff, aheejin.
Herald added subscribers: llvm-commits, sunfish, jgravelle-google, sbc100.

It does so using a simple nesting stack, and gives clear errors upon
violation. This is unique to wasm, since most CPUs do not have
any nested constructs.

Had to add an end of file check to the general assembler for this.

Note: if/else/end instructions are not currently supported in our
tablegen defs, so these tests will be enabled in a follow-up.
They already pass the nesting check.


Repository:
  rL LLVM

https://reviews.llvm.org/D55797

Files:
  include/llvm/MC/MCParser/MCTargetAsmParser.h
  lib/MC/MCParser/AsmParser.cpp
  lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
  test/MC/WebAssembly/basic-assembly.s
  test/MC/WebAssembly/simd-encodings.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55797.178564.patch
Type: text/x-patch
Size: 6593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181218/79a77cd9/attachment.bin>


More information about the llvm-commits mailing list