[WebAssembly] Fix load/store name detection for atomic instructions
authorHeejin Ahn <aheejin@gmail.com>
Wed, 20 Feb 2019 01:14:36 +0000 (01:14 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Wed, 20 Feb 2019 01:14:36 +0000 (01:14 +0000)
commit3477bd12a09927a4e5592ae3a910ad51f1876024
tree0db20fc42f257609b312877399e8af54317cd7a3
parentdfe7bbc1a4731a9ef3aeb39f54b49d5522663135
[WebAssembly] Fix load/store name detection for atomic instructions

Summary:
Fixed a bug in the routine in AsmParser that determines whether the
current instruction is a load or a store. Atomic instructions' prefixes
are not `atomic_` but `atomic.`, and all atomic instructions are also
memory instructions. Also fixed the printing format of atomic
instructions to match other memory instructions and added encoding tests
for atomic instructions.

Reviewers: aardappel, tlively

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D58337

llvm-svn: 354419
llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
llvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td
llvm/test/MC/WebAssembly/atomics-encodings.s [new file with mode: 0644]