LLVM: lib/Target/NVPTX/NVPTXMCExpr.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
15using namespace llvm;
16
17#define DEBUG_TYPE "nvptx-mcexpr"
18
21 return new (Ctx) NVPTXFloatMCExpr(Kind, Flt);
22}
23
25 bool Ignored;
26 unsigned NumHex;
28
29 switch (Kind) {
32
33
34 OS << "0x";
35 NumHex = 4;
37 break;
39 OS << "0x";
40 NumHex = 4;
42 break;
44 OS << "0f";
45 NumHex = 8;
47 break;
49 OS << "0d";
50 NumHex = 16;
52 break;
53 }
54
57}
58
62 return new (Ctx) NVPTXGenericMCSymbolRefExpr(SymExpr);
63}
64
67 OS << "generic(";
69 OS << ")";
70}
static const fltSemantics & IEEEsingle()
static const fltSemantics & BFloat()
static const fltSemantics & IEEEdouble()
static constexpr roundingMode rmNearestTiesToEven
static const fltSemantics & IEEEhalf()
LLVM_ABI opStatus convert(const fltSemantics &ToSemantics, roundingMode RM, bool *losesInfo)
APInt bitcastToAPInt() const
Class for arbitrary precision integers.
uint64_t getZExtValue() const
Get zero extended value.
This class is intended to be used as a base class for asm properties and features specific to the tar...
void printExpr(raw_ostream &, const MCExpr &) const
Context object for machine code objects.
Represent a reference to a symbol from inside an expression.
@ VK_NVPTX_HALF_PREC_FLOAT
@ VK_NVPTX_BFLOAT_PREC_FLOAT
@ VK_NVPTX_DOUBLE_PREC_FLOAT
@ VK_NVPTX_SINGLE_PREC_FLOAT
APFloat getAPFloat() const
getSubExpr - Get the child of this expression.
static const NVPTXFloatMCExpr * create(VariantKind Kind, const APFloat &Flt, MCContext &Ctx)
Definition NVPTXMCExpr.cpp:20
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
Definition NVPTXMCExpr.cpp:24
A wrapper for MCSymbolRefExpr that tells the assembly printer that the symbol should be enclosed by g...
static const NVPTXGenericMCSymbolRefExpr * create(const MCSymbolRefExpr *SymExpr, MCContext &Ctx)
Definition NVPTXMCExpr.cpp:60
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
Definition NVPTXMCExpr.cpp:65
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
FormattedNumber format_hex_no_prefix(uint64_t N, unsigned Width, bool Upper=false)
format_hex_no_prefix - Output N as a fixed width hexadecimal.