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