This is an archive of the discontinued LLVM Phabricator instance.

WebAssembly: start instructions
ClosedPublic

Authored by jfb on Jul 1 2015, 1:18 PM.

Details

Summary
  • Add 64-bit address space feature, and threads feature.
  • Rename SIMD feature to SIMD128.
  • Rename generic processor to MVP, to follow design's lead.
  • Add bleeding-edge 32 and 64 processors, with all features included.
  • Fix a few DEBUG_TYPE to match other backends.

Diff Detail

Repository
rL LLVM

Event Timeline

jfb updated this revision to Diff 28893.Jul 1 2015, 1:18 PM
jfb retitled this revision from to WebAssembly: start instructions.
jfb updated this object.
jfb edited the test plan for this revision. (Show Details)
jfb added a reviewer: sunfish.
jfb added a subscriber: Unknown Object (MLST).
sunfish added inline comments.Jul 1 2015, 2:37 PM
lib/Target/WebAssembly/WebAssembly.td
26 ↗(On Diff #28893)

Ok.

30 ↗(On Diff #28893)

Ok.

61 ↗(On Diff #28893)

The way similar things work on other targets is that there's one ProcessorModel which supports both 32-bit and 64-bit mode.

lib/Target/WebAssembly/WebAssemblyInstrAtomics.td
15 ↗(On Diff #28893)
lib/Target/WebAssembly/WebAssemblyInstrInfo.td
19 ↗(On Diff #28893)

We should add a HasAddr32 predicate too, since 64-bit mode can't use 32-bit addresses.

lib/Target/WebAssembly/WebAssemblySubtarget.h
32 ↗(On Diff #28893)

64-bit mode is implied by TargetTriple.isArch64Bit() so we don't need a separate field here.

jfb updated this revision to Diff 28908.Jul 1 2015, 3:32 PM
  • Address sunfish's comments.
jfb updated this revision to Diff 28909.Jul 1 2015, 3:33 PM
  • Remove obsolete note.
jfb added a comment.Jul 1 2015, 3:34 PM

@sunfish updated. I left a FIXME for the atomic IR passes, but I think we can figure it out later.

sunfish accepted this revision.Jul 1 2015, 4:02 PM
sunfish edited edge metadata.

lgtm

This revision is now accepted and ready to land.Jul 1 2015, 4:02 PM
This revision was automatically updated to reflect the committed changes.