This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fix load/store name detection for atomic instructions
ClosedPublic

Authored by aheejin on Feb 17 2019, 5:16 PM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

aheejin created this revision.Feb 17 2019, 5:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2019, 5:16 PM
tlively accepted this revision.Feb 18 2019, 3:31 PM
tlively added inline comments.
test/MC/WebAssembly/atomics-encodings.s
1 ↗(On Diff #187183)

🎉

This revision is now accepted and ready to land.Feb 18 2019, 3:31 PM
aardappel accepted this revision.Feb 19 2019, 9:35 AM
aardappel added inline comments.
lib/Target/WebAssembly/WebAssemblyInstrAtomics.td
340 ↗(On Diff #187183)

Is this syntax in line with all other uses of p2align in .td?

aheejin marked an inline comment as done.Feb 19 2019, 5:15 PM
aheejin added inline comments.
lib/Target/WebAssembly/WebAssemblyInstrAtomics.td
340 ↗(On Diff #187183)

Yes: example

This revision was automatically updated to reflect the committed changes.