WebAssembly: print basic integer assembly.
authorJF Bastien <jfb@google.com>
Fri, 31 Jul 2015 17:53:38 +0000 (17:53 +0000)
committerJF Bastien <jfb@google.com>
Fri, 31 Jul 2015 17:53:38 +0000 (17:53 +0000)
commit3f2cb5c959754a99ebe7fe9611e8788afd2da8e8
tree8de0420bb7421948e7d36019e7a3acf6c22778f6
parent0229c3b7ada43f26c6a335788fdb09d9c368d356
WebAssembly: print basic integer assembly.

Summary:
This prints assembly for int32 integer operations defined in WebAssemblyInstrInteger.td only, with major caveats:

  - The operation names are currently incorrect.
  - Other integer and floating-point types will be added later.
  - The printer isn't factored out to handle recursive AST code yet, since it can't even handle control flow anyways.
  - The assembly format isn't full s-expressions yet either, this will be added later.
  - This currently disables PrologEpilogCodeInserter as well as MachineCopyPropagation becasue they don't like virtual registers, which WebAssembly likes quite a bit. This will be fixed by factoring out NVPTX's change (currently a fork of PrologEpilogCodeInserter).

Reviewers: sunfish

Subscribers: llvm-commits, jfb

Differential Revision: http://reviews.llvm.org/D11671

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243763 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
lib/Target/WebAssembly/WebAssemblyISelLowering.h
lib/Target/WebAssembly/WebAssemblyInstrControl.td [new file with mode: 0644]
lib/Target/WebAssembly/WebAssemblyInstrInfo.td
lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
test/CodeGen/WebAssembly/cpus.ll
test/CodeGen/WebAssembly/integer.ll