LLVM  7.0.0svn
ARMMCTargetDesc.h
Go to the documentation of this file.
1 //===-- ARMMCTargetDesc.h - ARM 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 // This file provides ARM specific target descriptions.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_ARM_MCTARGETDESC_ARMMCTARGETDESC_H
15 #define LLVM_LIB_TARGET_ARM_MCTARGETDESC_ARMMCTARGETDESC_H
16 
17 #include "llvm/Support/DataTypes.h"
18 #include <memory>
19 #include <string>
20 
21 namespace llvm {
22 class formatted_raw_ostream;
23 class MCAsmBackend;
24 class MCCodeEmitter;
25 class MCContext;
26 class MCInstrInfo;
27 class MCInstPrinter;
28 class MCObjectTargetWriter;
29 class MCObjectWriter;
30 class MCRegisterInfo;
31 class MCSubtargetInfo;
32 class MCStreamer;
33 class MCTargetOptions;
34 class MCRelocationInfo;
35 class MCTargetStreamer;
36 class StringRef;
37 class Target;
38 class Triple;
39 class raw_ostream;
40 class raw_pwrite_stream;
41 
42 Target &getTheARMLETarget();
43 Target &getTheThumbLETarget();
44 Target &getTheARMBETarget();
45 Target &getTheThumbBETarget();
46 
47 namespace ARM_MC {
48 std::string ParseARMTriple(const Triple &TT, StringRef CPU);
49 
50 /// Create a ARM MCSubtargetInfo instance. This is exposed so Asm parser, etc.
51 /// do not need to go through TargetRegistry.
53  StringRef FS);
54 }
55 
59  MCInstPrinter *InstPrint,
60  bool isVerboseAsm);
62  const MCSubtargetInfo &STI);
63 
65  const MCRegisterInfo &MRI,
66  MCContext &Ctx);
67 
69  const MCRegisterInfo &MRI,
70  MCContext &Ctx);
71 
73  const MCRegisterInfo &MRI,
74  const MCTargetOptions &Options);
75 
77  const MCRegisterInfo &MRI,
78  const MCTargetOptions &Options);
79 
80 // Construct a PE/COFF machine code streamer which will generate a PE/COFF
81 // object file.
83  std::unique_ptr<MCAsmBackend> &&MAB,
84  std::unique_ptr<MCObjectWriter> &&OW,
85  std::unique_ptr<MCCodeEmitter> &&Emitter,
86  bool RelaxAll,
87  bool IncrementalLinkerCompatible);
88 
89 /// Construct an ELF Mach-O object writer.
90 std::unique_ptr<MCObjectTargetWriter> createARMELFObjectWriter(uint8_t OSABI);
91 
92 /// Construct an ARM Mach-O object writer.
93 std::unique_ptr<MCObjectTargetWriter>
95  uint32_t CPUSubtype);
96 
97 /// Construct an ARM PE/COFF object writer.
98 std::unique_ptr<MCObjectTargetWriter>
99 createARMWinCOFFObjectWriter(bool Is64Bit);
100 
101 /// Construct ARM Mach-O relocation info.
103 } // End llvm namespace
104 
105 // Defines symbolic names for ARM registers. This defines a mapping from
106 // register name to register number.
107 //
108 #define GET_REGINFO_ENUM
109 #include "ARMGenRegisterInfo.inc"
110 
111 // Defines symbolic names for the ARM instructions.
112 //
113 #define GET_INSTRINFO_ENUM
114 #include "ARMGenInstrInfo.inc"
115 
116 #define GET_SUBTARGETINFO_ENUM
117 #include "ARMGenSubtargetInfo.inc"
118 
119 #endif
MCAsmBackend * createARMLEAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
LLVMContext & Context
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
formatted_raw_ostream - A raw_ostream that wraps another one and keeps track of line and column posit...
Target specific streamer interface.
Definition: MCStreamer.h:83
MCRelocationInfo * createARMMachORelocationInfo(MCContext &Ctx)
Construct ARM Mach-O relocation info.
Target & getTheThumbLETarget()
Target & getTheARMBETarget()
Context object for machine code objects.
Definition: MCContext.h:63
Target & getTheThumbBETarget()
MCAsmBackend * createARMBEAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
MCTargetStreamer * createARMTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint, bool isVerboseAsm)
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
MCTargetStreamer * createARMObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
Streaming machine code generation interface.
Definition: MCStreamer.h:183
unsigned const MachineRegisterInfo * MRI
MCCodeEmitter - Generic instruction encoding interface.
Definition: MCCodeEmitter.h:22
Interface to description of machine instruction set.
Definition: MCInstrInfo.h:24
Create MCExprs from relocations found in an object file.
std::unique_ptr< MCObjectTargetWriter > createARMELFObjectWriter(uint8_t OSABI)
Construct an ELF Mach-O object writer.
MCSubtargetInfo * createARMMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
Create a ARM MCSubtargetInfo instance.
MCStreamer * createARMWinCOFFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > &&MAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&Emitter, bool RelaxAll, bool IncrementalLinkerCompatible)
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
Target - Wrapper for Target specific information.
std::unique_ptr< MCObjectTargetWriter > createARMWinCOFFObjectWriter(bool Is64Bit)
Construct an ARM PE/COFF object writer.
std::unique_ptr< MCObjectTargetWriter > createARMMachObjectWriter(bool Is64Bit, uint32_t CPUType, uint32_t CPUSubtype)
Construct an ARM Mach-O object writer.
MCCodeEmitter * createARMLEMCCodeEmitter(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx)
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Definition: MCInstPrinter.h:40
Generic base class for all target subtargets.
MCTargetStreamer * createARMNullTargetStreamer(MCStreamer &S)
Generic interface to target specific assembler backends.
Definition: MCAsmBackend.h:42
std::string ParseARMTriple(const Triple &TT, StringRef CPU)
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
Target & getTheARMLETarget()
MCCodeEmitter * createARMBEMCCodeEmitter(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx)