LLVM
24.0.0git
lib
Target
PISA
MCTargetDesc
PISAMCExpr.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 PISA-specific MC expressions.
11
///
12
//===----------------------------------------------------------------------===//
13
14
#include "
PISAMCExpr.h
"
15
#include "
PISAInstPrinter.h
"
16
#include "
llvm/MC/MCAssembler.h
"
17
#include "
llvm/MC/MCContext.h
"
18
#include "
llvm/Support/Format.h
"
19
using namespace
llvm
;
20
21
const
PISAGlobalAddressMCExpr
*
22
PISAGlobalAddressMCExpr::create
(
const
MCSymbol
&Symbol,
MCContext
&Ctx) {
23
return
new
(Ctx) PISAGlobalAddressMCExpr(Symbol);
24
}
25
26
PISAGlobalAddressMCExpr::PISAGlobalAddressMCExpr(
const
MCSymbol
&Sym)
27
: Symbol(&Sym) {
28
assert
(Symbol);
29
}
30
31
void
PISAGlobalAddressMCExpr::printImpl
(
raw_ostream
&OS,
32
const
MCAsmInfo
*MAI)
const
{
33
OS <<
'@'
;
34
PISAInstPrinter::printSymbolName
(OS, Symbol->getName(), MAI);
35
}
assert
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Format.h
MCAssembler.h
MCContext.h
PISAInstPrinter.h
This file declares the PISA MCInst printer.
PISAMCExpr.h
This file declares PISA-specific MC expressions for floating-point immediates.
llvm::MCAsmInfo
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition
MCAsmInfo.h:69
llvm::MCContext
Context object for machine code objects.
Definition
MCContext.h:84
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition
MCSymbol.h:42
llvm::PISAGlobalAddressMCExpr
MCExpr for Global Address.
Definition
PISAMCExpr.h:30
llvm::PISAGlobalAddressMCExpr::create
static const PISAGlobalAddressMCExpr * create(const MCSymbol &Symbol, MCContext &Ctx)
Definition
PISAMCExpr.cpp:22
llvm::PISAGlobalAddressMCExpr::printImpl
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
Definition
PISAMCExpr.cpp:31
llvm::PISAInstPrinter::printSymbolName
static void printSymbolName(raw_ostream &OS, StringRef Name, const MCAsmInfo *MAI)
Definition
PISAInstPrinter.cpp:366
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition
raw_ostream.h:53
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
DefaultTargetInfo.h:21
Generated on
for LLVM by
1.14.0