blob: 53dd9290348af645546870d8ee9997311e331443 [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//===----------------------------------------------------------------------===//
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
19include "llvm/Target/Target.td"
20
21//===----------------------------------------------------------------------===//
22// WebAssembly Subtarget features.
23//===----------------------------------------------------------------------===//
24
JF Bastien03855df2015-07-01 23:41:25 +000025def FeatureSIMD128 : SubtargetFeature<"simd128", "HasSIMD128", "false",
26 "Enable 128-bit SIMD">;
Dan Gohman10e730a2015-06-29 23:51:55 +000027
28//===----------------------------------------------------------------------===//
29// Architectures.
30//===----------------------------------------------------------------------===//
31
32//===----------------------------------------------------------------------===//
33// Register File Description
34//===----------------------------------------------------------------------===//
35
36include "WebAssemblyRegisterInfo.td"
37
38//===----------------------------------------------------------------------===//
39// Instruction Descriptions
40//===----------------------------------------------------------------------===//
41
42include "WebAssemblyInstrInfo.td"
43
44def WebAssemblyInstrInfo : InstrInfo;
45
46//===----------------------------------------------------------------------===//
47// WebAssembly Processors supported.
48//===----------------------------------------------------------------------===//
49
JF Bastien03855df2015-07-01 23:41:25 +000050// Minimal Viable Product.
51def : ProcessorModel<"mvp", NoSchedModel, []>;
52
JF Bastien088c47e2015-07-27 23:25:54 +000053// Generic processor: latest stable version.
54def : ProcessorModel<"generic", NoSchedModel, []>;
55
JF Bastien03855df2015-07-01 23:41:25 +000056// Latest and greatest experimental version of WebAssembly. Bugs included!
57def : ProcessorModel<"bleeding-edge", NoSchedModel, [FeatureSIMD128]>;
Dan Gohman10e730a2015-06-29 23:51:55 +000058
59//===----------------------------------------------------------------------===//
60// Target Declaration
61//===----------------------------------------------------------------------===//
62
63def WebAssembly : Target {
64 let InstructionSet = WebAssemblyInstrInfo;
65}