LLVM 24.0.0git
PISAMCTargetDesc.cpp
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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/// \file
10/// This file implements the PISA MC target descriptions.
11///
12//===----------------------------------------------------------------------===//
13
14#include "PISAMCTargetDesc.h"
15#include "PISAInstPrinter.h"
16#include "PISAMCAsmInfo.h"
17#include "PISATargetStreamer.h"
20#include "llvm/MC/MCInstrInfo.h"
25
26#define GET_INSTRINFO_MC_DESC
27#define ENABLE_INSTR_PREDICATE_VERIFIER
28#define GET_INSTRINFO_OPERAND_ENUM
29#define GET_INSTRINFO_NAMED_OPS
30#include "PISAGenInstrInfo.inc"
31
32#define GET_SUBTARGETINFO_MC_DESC
33#include "PISAGenSubtargetInfo.inc"
34
35#define GET_REGINFO_MC_DESC
36#include "PISAGenRegisterInfo.inc"
37
38using namespace llvm;
39
41 MCInstrInfo *X = new MCInstrInfo();
42 InitPISAMCInstrInfo(X);
43 return X;
44}
45
48 InitPISAMCRegisterInfo(X, 0);
49 return X;
50}
51
53 StringRef CPU, StringRef FS) {
54 return createPISAMCSubtargetInfoImpl(TT, CPU, /*TuneCPU=*/CPU, FS);
55}
56
58 unsigned SyntaxVariant,
59 const MCAsmInfo &MAI,
60 const MCInstrInfo &MII,
61 const MCRegisterInfo &MRI) {
62 assert(SyntaxVariant == 0);
63 return new PISAInstPrinter(MAI, MII, MRI);
64}
65
66// NOLINTNEXTLINE(readability-identifier-naming)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define X(NUM, ENUM, NAME)
Definition ELF.h:665
#define LLVM_EXTERNAL_VISIBILITY
Definition Compiler.h:132
#define T
This file declares the PISA MCInst printer.
This file declares the assembly properties for the PISA target.
static MCInstPrinter * createPISAMCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
static MCSubtargetInfo * createPISAMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
static MCRegisterInfo * createPISAMCRegisterInfo(const Triple &TT)
LLVM_EXTERNAL_VISIBILITY void LLVMInitializePISATargetMC()
static MCInstrInfo * createPISAMCInstrInfo()
This file declares the PISA MC target descriptions.
This file declares the PISA target registration interface.
This file declares the PISA target streamer.
MachineRegisterInfo & MRI
This file contains some functions that are useful when dealing with strings.
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition MCAsmInfo.h:69
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Interface to description of machine instruction set.
Definition MCInstrInfo.h:27
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Generic base class for all target subtargets.
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:48
This is an optimization pass for GlobalISel generic memory operations.
Target & getThePISATarget()
MCTargetStreamer * createPISAAsmTargetStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint)
MCTargetStreamer * createPISAObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
MCTargetStreamer * createPISANullTargetStreamer(MCStreamer &S)
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 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 RegisterNullTargetStreamer(Target &T, Target::NullTargetStreamerCtorTy 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.
static void RegisterAsmTargetStreamer(Target &T, Target::AsmTargetStreamerCtorTy Fn)