[WebAssembly] Initial WebAssembly backend
[oota-llvm.git] / lib / Target / WebAssembly / WebAssembly.td
1 //- WebAssembly.td - Describe the WebAssembly Target Machine --*- tablegen -*-//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This is a target description file for the WebAssembly architecture, which is
11 // also known as "wasm".
12 //
13 //===----------------------------------------------------------------------===//
14
15 //===----------------------------------------------------------------------===//
16 // Target-independent interfaces which we are implementing
17 //===----------------------------------------------------------------------===//
18
19 include "llvm/Target/Target.td"
20
21 //===----------------------------------------------------------------------===//
22 // WebAssembly Subtarget features.
23 //===----------------------------------------------------------------------===//
24
25 def FeatureSIMD : SubtargetFeature<"simd", "HasSIMD", "true",
26                                    "Enable SIMD">;
27
28 //===----------------------------------------------------------------------===//
29 // Architectures.
30 //===----------------------------------------------------------------------===//
31
32 //===----------------------------------------------------------------------===//
33 // Register File Description
34 //===----------------------------------------------------------------------===//
35
36 include "WebAssemblyRegisterInfo.td"
37
38 //===----------------------------------------------------------------------===//
39 // Instruction Descriptions
40 //===----------------------------------------------------------------------===//
41
42 include "WebAssemblyInstrInfo.td"
43
44 def WebAssemblyInstrInfo : InstrInfo;
45
46 //===----------------------------------------------------------------------===//
47 // WebAssembly Processors supported.
48 //===----------------------------------------------------------------------===//
49
50 def : ProcessorModel<"generic", NoSchedModel, [FeatureSIMD]>;
51
52 //===----------------------------------------------------------------------===//
53 // Target Declaration
54 //===----------------------------------------------------------------------===//
55
56 def WebAssembly : Target {
57   let InstructionSet = WebAssemblyInstrInfo;
58 }