LLVM  9.0.0svn
MSP430MCTargetDesc.cpp
Go to the documentation of this file.
1 //===-- MSP430MCTargetDesc.cpp - MSP430 Target Descriptions ---------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file provides MSP430 specific target descriptions.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "MSP430MCTargetDesc.h"
15 #include "MSP430MCAsmInfo.h"
16 #include "llvm/MC/MCInstrInfo.h"
17 #include "llvm/MC/MCRegisterInfo.h"
20 
21 using namespace llvm;
22 
23 #define GET_INSTRINFO_MC_DESC
24 #include "MSP430GenInstrInfo.inc"
25 
26 #define GET_SUBTARGETINFO_MC_DESC
27 #include "MSP430GenSubtargetInfo.inc"
28 
29 #define GET_REGINFO_MC_DESC
30 #include "MSP430GenRegisterInfo.inc"
31 
33  MCInstrInfo *X = new MCInstrInfo();
34  InitMSP430MCInstrInfo(X);
35  return X;
36 }
37 
40  InitMSP430MCRegisterInfo(X, MSP430::PC);
41  return X;
42 }
43 
44 static MCSubtargetInfo *
46  return createMSP430MCSubtargetInfoImpl(TT, CPU, FS);
47 }
48 
50  unsigned SyntaxVariant,
51  const MCAsmInfo &MAI,
52  const MCInstrInfo &MII,
53  const MCRegisterInfo &MRI) {
54  if (SyntaxVariant == 0)
55  return new MSP430InstPrinter(MAI, MII, MRI);
56  return nullptr;
57 }
58 
59 extern "C" void LLVMInitializeMSP430TargetMC() {
61 
71 }
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
Target & getTheMSP430Target()
This class represents lattice values for constants.
Definition: AllocatorList.h:23
MCCodeEmitter * createMSP430MCCodeEmitter(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx)
Creates a machine code emitter for MSP430.
static void RegisterMCInstPrinter(Target &T, Target::MCInstPrinterCtorTy Fn)
RegisterMCInstPrinter - Register a MCInstPrinter implementation for the given target.
static MCRegisterInfo * createMSP430MCRegisterInfo(const Triple &TT)
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:55
static void RegisterMCAsmBackend(Target &T, Target::MCAsmBackendCtorTy Fn)
RegisterMCAsmBackend - Register a MCAsmBackend implementation for the given target.
unsigned const MachineRegisterInfo * MRI
Interface to description of machine instruction set.
Definition: MCInstrInfo.h:23
static void RegisterMCSubtargetInfo(Target &T, Target::MCSubtargetInfoCtorFnTy Fn)
RegisterMCSubtargetInfo - Register a MCSubtargetInfo implementation for the given target...
static void RegisterObjectTargetStreamer(Target &T, Target::ObjectTargetStreamerCtorTy Fn)
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43
static void RegisterMCCodeEmitter(Target &T, Target::MCCodeEmitterCtorTy Fn)
RegisterMCCodeEmitter - Register a MCCodeEmitter implementation for the given target.
static void RegisterMCRegInfo(Target &T, Target::MCRegInfoCtorFnTy Fn)
RegisterMCRegInfo - Register a MCRegisterInfo implementation for the given target.
Target - Wrapper for Target specific information.
MCTargetStreamer * createMSP430ObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Definition: MCInstPrinter.h:39
static void RegisterMCInstrInfo(Target &T, Target::MCInstrInfoCtorFnTy Fn)
RegisterMCInstrInfo - Register a MCInstrInfo implementation for the given target. ...
Generic base class for all target subtargets.
void LLVMInitializeMSP430TargetMC()
RegisterMCAsmInfo - Helper template for registering a target assembly info implementation.
static MCInstPrinter * createMSP430MCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
static MCInstrInfo * createMSP430MCInstrInfo()
static MCSubtargetInfo * createMSP430MCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
MCAsmBackend * createMSP430MCAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)