blob: f647349d759bf96ead924d7d236079c90d27a0f3 [file] [log] [blame]
Dan Gohman10e730a2015-06-29 23:51:55 +00001//- 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//===----------------------------------------------------------------------===//
Dan Gohmanad664b32015-12-08 03:33:51 +00009///
10/// \file
11/// \brief This is a target description file for the WebAssembly architecture,
12/// which is also known as "wasm".
13///
Dan Gohman10e730a2015-06-29 23:51:55 +000014//===----------------------------------------------------------------------===//
15
16//===----------------------------------------------------------------------===//
17// Target-independent interfaces which we are implementing
18//===----------------------------------------------------------------------===//
19
20include "llvm/Target/Target.td"
21
22//===----------------------------------------------------------------------===//
23// WebAssembly Subtarget features.
24//===----------------------------------------------------------------------===//
25
Derek Schuff39bf39f2016-08-02 23:16:09 +000026def FeatureSIMD128 : SubtargetFeature<"simd128", "HasSIMD128", "true",
JF Bastien03855df2015-07-01 23:41:25 +000027 "Enable 128-bit SIMD">;
Dan Gohman10e730a2015-06-29 23:51:55 +000028
29//===----------------------------------------------------------------------===//
30// Architectures.
31//===----------------------------------------------------------------------===//
32
33//===----------------------------------------------------------------------===//
34// Register File Description
35//===----------------------------------------------------------------------===//
36
37include "WebAssemblyRegisterInfo.td"
38
39//===----------------------------------------------------------------------===//
40// Instruction Descriptions
41//===----------------------------------------------------------------------===//
42
43include "WebAssemblyInstrInfo.td"
44
45def WebAssemblyInstrInfo : InstrInfo;
46
47//===----------------------------------------------------------------------===//
48// WebAssembly Processors supported.
49//===----------------------------------------------------------------------===//
50
JF Bastien03855df2015-07-01 23:41:25 +000051// Minimal Viable Product.
52def : ProcessorModel<"mvp", NoSchedModel, []>;
53
JF Bastien088c47e2015-07-27 23:25:54 +000054// Generic processor: latest stable version.
55def : ProcessorModel<"generic", NoSchedModel, []>;
56
JF Bastien03855df2015-07-01 23:41:25 +000057// Latest and greatest experimental version of WebAssembly. Bugs included!
58def : ProcessorModel<"bleeding-edge", NoSchedModel, [FeatureSIMD128]>;
Dan Gohman10e730a2015-06-29 23:51:55 +000059
60//===----------------------------------------------------------------------===//
61// Target Declaration
62//===----------------------------------------------------------------------===//
63
64def WebAssembly : Target {
65 let InstructionSet = WebAssemblyInstrInfo;
66}