1d3a7078a45737ee3c016393e6356274d21eeb7c
[oota-llvm.git] / lib / Target / WebAssembly / MCTargetDesc / WebAssemblyMCTargetDesc.h
1 //==- WebAssemblyMCTargetDesc.h - WebAssembly Target Descriptions -*- C++ -*-=//
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 /// \file
11 /// \brief This file provides WebAssembly-specific target descriptions.
12 ///
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
16 #define LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
17
18 #include "llvm/Support/DataTypes.h"
19
20 namespace llvm {
21
22 class MCAsmBackend;
23 class MCCodeEmitter;
24 class MCContext;
25 class MCInstrInfo;
26 class MCObjectWriter;
27 class MCSubtargetInfo;
28 class Target;
29 class Triple;
30 class raw_pwrite_stream;
31
32 extern Target TheWebAssemblyTarget32;
33 extern Target TheWebAssemblyTarget64;
34
35 MCCodeEmitter *createWebAssemblyMCCodeEmitter(const MCInstrInfo &MCII,
36                                               MCContext &Ctx);
37
38 MCAsmBackend *createWebAssemblyAsmBackend(const Triple &TT);
39
40 MCObjectWriter *createWebAssemblyELFObjectWriter(raw_pwrite_stream &OS,
41                                                  bool Is64Bit, uint8_t OSABI);
42
43 } // end namespace llvm
44
45 // Defines symbolic names for WebAssembly registers. This defines a mapping from
46 // register name to register number.
47 //
48 #define GET_REGINFO_ENUM
49 #include "WebAssemblyGenRegisterInfo.inc"
50
51 // Defines symbolic names for the WebAssembly instructions.
52 //
53 #define GET_INSTRINFO_ENUM
54 #include "WebAssemblyGenInstrInfo.inc"
55
56 #define GET_SUBTARGETINFO_ENUM
57 #include "WebAssemblyGenSubtargetInfo.inc"
58
59 #endif