LLVM 19.0.0git
XtensaMCTargetDesc.cpp
Go to the documentation of this file.
1//===-- XtensaMCTargetDesc.cpp - Xtensa target descriptions ---------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
6// See https://llvm.org/LICENSE.txt for license information.
7// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8//
9//===----------------------------------------------------------------------===//
10#include "XtensaMCTargetDesc.h"
11#include "XtensaInstPrinter.h"
12#include "XtensaMCAsmInfo.h"
14#include "llvm/ADT/STLExtras.h"
15#include "llvm/MC/MCAsmInfo.h"
16#include "llvm/MC/MCInstrInfo.h"
18#include "llvm/MC/MCStreamer.h"
22
23#define GET_INSTRINFO_MC_DESC
24#include "XtensaGenInstrInfo.inc"
25
26#define GET_REGINFO_MC_DESC
27#include "XtensaGenRegisterInfo.inc"
28
29#define GET_SUBTARGETINFO_MC_DESC
30#include "XtensaGenSubtargetInfo.inc"
31
32using namespace llvm;
33
35 const Triple &TT,
36 const MCTargetOptions &Options) {
37 MCAsmInfo *MAI = new XtensaMCAsmInfo(TT);
38 return MAI;
39}
40
42 MCInstrInfo *X = new MCInstrInfo();
43 InitXtensaMCInstrInfo(X);
44 return X;
45}
46
48 unsigned SyntaxVariant,
49 const MCAsmInfo &MAI,
50 const MCInstrInfo &MII,
51 const MCRegisterInfo &MRI) {
52 return new XtensaInstPrinter(MAI, MII, MRI);
53}
54
57 InitXtensaMCRegisterInfo(X, Xtensa::SP);
58 return X;
59}
60
61static MCSubtargetInfo *
63 return createXtensaMCSubtargetInfoImpl(TT, CPU, CPU, FS);
64}
65
67 // Register the MCAsmInfo.
69
70 // Register the MCCodeEmitter.
73
74 // Register the MCInstrInfo.
76
77 // Register the MCInstPrinter.
80
81 // Register the MCRegisterInfo.
84
85 // Register the MCSubtargetInfo.
88
89 // Register the MCAsmBackend.
92}
unsigned const MachineRegisterInfo * MRI
#define LLVM_EXTERNAL_VISIBILITY
Definition: Compiler.h:135
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
static LVOptions Options
Definition: LVOptions.cpp:25
This file contains some templates that are useful if you are working with the STL at all.
static MCInstrInfo * createXtensaMCInstrInfo()
static MCInstPrinter * createXtensaMCInstPrinter(const Triple &TT, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
static MCAsmInfo * createXtensaMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TT, const MCTargetOptions &Options)
static MCRegisterInfo * createXtensaMCRegisterInfo(const Triple &TT)
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXtensaTargetMC()
static MCSubtargetInfo * createXtensaMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
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:45
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
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
Target & getTheXtensaTarget()
MCCodeEmitter * createXtensaMCCodeEmitter(const MCInstrInfo &MCII, MCContext &Ctx)
MCAsmBackend * createXtensaMCAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
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 RegisterMCAsmInfo(Target &T, Target::MCAsmInfoCtorFnTy Fn)
RegisterMCAsmInfo - Register a MCAsmInfo implementation for the given target.
static void RegisterMCSubtargetInfo(Target &T, Target::MCSubtargetInfoCtorFnTy Fn)
RegisterMCSubtargetInfo - Register a MCSubtargetInfo implementation for the given target.
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.