LLVM 17.0.0git
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"
14#include "MSP430InstPrinter.h"
15#include "MSP430MCAsmInfo.h"
17#include "llvm/MC/MCInstrInfo.h"
21
22using namespace llvm;
23
24#define GET_INSTRINFO_MC_DESC
25#define ENABLE_INSTR_PREDICATE_VERIFIER
26#include "MSP430GenInstrInfo.inc"
27
28#define GET_SUBTARGETINFO_MC_DESC
29#include "MSP430GenSubtargetInfo.inc"
30
31#define GET_REGINFO_MC_DESC
32#include "MSP430GenRegisterInfo.inc"
33
35 MCInstrInfo *X = new MCInstrInfo();
36 InitMSP430MCInstrInfo(X);
37 return X;
38}
39
42 InitMSP430MCRegisterInfo(X, MSP430::PC);
43 return X;
44}
45
46static MCSubtargetInfo *
48 return createMSP430MCSubtargetInfoImpl(TT, CPU, /*TuneCPU*/ CPU, FS);
49}
50
52 unsigned SyntaxVariant,
53 const MCAsmInfo &MAI,
54 const MCInstrInfo &MII,
55 const MCRegisterInfo &MRI) {
56 if (SyntaxVariant == 0)
57 return new MSP430InstPrinter(MAI, MII, MRI);
58 return nullptr;
59}
60
63
73}
unsigned const MachineRegisterInfo * MRI
#define LLVM_EXTERNAL_VISIBILITY
Definition: Compiler.h:127
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
static MCRegisterInfo * createMSP430MCRegisterInfo(const Triple &TT)
static MCSubtargetInfo * createMSP430MCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
static MCInstPrinter * createMSP430MCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMSP430TargetMC()
static MCInstrInfo * createMSP430MCInstrInfo()
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Definition: MCInstPrinter.h:44
Interface to description of machine instruction set.
Definition: MCInstrInfo.h:26
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Generic base class for all target subtargets.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
MCTargetStreamer * createMSP430ObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
Target & getTheMSP430Target()
MCCodeEmitter * createMSP430MCCodeEmitter(const MCInstrInfo &MCII, MCContext &Ctx)
Creates a machine code emitter for MSP430.
MCAsmBackend * createMSP430MCAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
RegisterMCAsmInfo - Helper template for registering a target assembly info implementation.
static void RegisterMCRegInfo(Target &T, Target::MCRegInfoCtorFnTy Fn)
RegisterMCRegInfo - Register a MCRegisterInfo implementation for the given target.
static void RegisterMCAsmBackend(Target &T, Target::MCAsmBackendCtorTy Fn)
RegisterMCAsmBackend - Register a MCAsmBackend implementation for the given target.
static void RegisterMCCodeEmitter(Target &T, Target::MCCodeEmitterCtorTy Fn)
RegisterMCCodeEmitter - Register a MCCodeEmitter implementation for the given target.
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)
static void RegisterMCInstPrinter(Target &T, Target::MCInstPrinterCtorTy Fn)
RegisterMCInstPrinter - Register a MCInstPrinter implementation for the given target.
static void RegisterMCInstrInfo(Target &T, Target::MCInstrInfoCtorFnTy Fn)
RegisterMCInstrInfo - Register a MCInstrInfo implementation for the given target.