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 #include <string>
20 
21 namespace llvm {
22 
23 class formatted_raw_ostream;
24 class MCAsmBackend;
25 class MCCodeEmitter;
26 class MCContext;
27 class MCInstrInfo;
28 class MCRegisterInfo;
29 class MCObjectWriter;
30 class MCStreamer;
31 class MCSubtargetInfo;
32 class MCTargetStreamer;
33 class StringRef;
34 class Target;
35 class Triple;
36 class raw_ostream;
37 class raw_pwrite_stream;
38 
39 extern Target TheWebAssemblyTarget32;
40 extern Target TheWebAssemblyTarget64;
41 
42 MCCodeEmitter *createWebAssemblyMCCodeEmitter(const MCInstrInfo &MCII,
43                                               const MCRegisterInfo &MRI,
44                                               MCContext &Ctx);
45 
46 MCAsmBackend *createWebAssemblyAsmBackend(const Target &T,
47                                           const MCRegisterInfo &MRI,
48                                           const Triple &TT, StringRef CPU);
49 
50 } // end namespace llvm
51 
52 // Defines symbolic names for WebAssembly registers. This defines a mapping from
53 // register name to register number.
54 //
55 #define GET_REGINFO_ENUM
56 #include "WebAssemblyGenRegisterInfo.inc"
57 
58 // Defines symbolic names for the WebAssembly instructions.
59 //
60 #define GET_INSTRINFO_ENUM
61 #include "WebAssemblyGenInstrInfo.inc"
62 
63 #define GET_SUBTARGETINFO_ENUM
64 #include "WebAssemblyGenSubtargetInfo.inc"
65 
66 #endif
67