LLVM
22.0.0git
lib
Target
Hexagon
MCTargetDesc
HexagonMCExpr.h
Go to the documentation of this file.
1
//==- HexagonMCExpr.h - Hexagon specific MC expression classes --*- C++ -*-===//
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
#ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H
10
#define LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H
11
12
#include "
llvm/MC/MCExpr.h
"
13
14
namespace
llvm
{
15
class
HexagonMCExpr :
public
MCTargetExpr
{
16
public
:
17
enum
VariantKind
:
uint8_t
{
18
VK_None
,
19
20
VK_DTPREL
=
MCSymbolRefExpr::FirstTargetSpecifier
,
21
VK_GD_GOT
,
22
VK_GD_PLT
,
23
VK_GOT
,
24
VK_GOTREL
,
25
VK_IE
,
26
VK_IE_GOT
,
27
VK_LD_GOT
,
28
VK_LD_PLT
,
29
VK_PCREL
,
30
VK_PLT
,
31
VK_TPREL
,
32
33
VK_LO16
,
34
VK_HI16
,
35
VK_GPREL
,
36
};
37
38
static
HexagonMCExpr
*
create
(
MCExpr
const
*Expr,
MCContext
&Ctx);
39
void
printImpl
(
raw_ostream
&OS,
const
MCAsmInfo
*MAI)
const override
;
40
bool
evaluateAsRelocatableImpl
(
MCValue
&Res,
41
const
MCAssembler
*Asm)
const override
;
42
void
visitUsedExpr
(
MCStreamer
&Streamer)
const override
;
43
MCFragment
*
findAssociatedFragment
()
const override
;
44
MCExpr
const
*
getExpr
()
const
;
45
void
setMustExtend
(
bool
Val =
true
);
46
bool
mustExtend
()
const
;
47
void
setMustNotExtend
(
bool
Val =
true
);
48
bool
mustNotExtend
()
const
;
49
void
setS27_2_reloc
(
bool
Val =
true
);
50
bool
s27_2_reloc
()
const
;
51
void
setSignMismatch
(
bool
Val =
true
);
52
bool
signMismatch
()
const
;
53
54
private
:
55
HexagonMCExpr
(
MCExpr
const
*Expr);
56
MCExpr
const
*Expr;
57
bool
MustNotExtend;
58
bool
MustExtend;
59
bool
S27_2_reloc;
60
bool
SignMismatch;
61
};
62
}
// end namespace llvm
63
64
#endif
// LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H
MCExpr.h
llvm::HexagonMCExpr
Definition
HexagonMCExpr.h:15
llvm::HexagonMCExpr::setMustNotExtend
void setMustNotExtend(bool Val=true)
Definition
HexagonMCExpr.cpp:46
llvm::HexagonMCExpr::mustNotExtend
bool mustNotExtend() const
Definition
HexagonMCExpr.cpp:50
llvm::HexagonMCExpr::printImpl
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
Definition
HexagonMCExpr.cpp:61
llvm::HexagonMCExpr::VariantKind
VariantKind
Definition
HexagonMCExpr.h:17
llvm::HexagonMCExpr::VK_PCREL
@ VK_PCREL
Definition
HexagonMCExpr.h:29
llvm::HexagonMCExpr::VK_None
@ VK_None
Definition
HexagonMCExpr.h:18
llvm::HexagonMCExpr::VK_GOT
@ VK_GOT
Definition
HexagonMCExpr.h:23
llvm::HexagonMCExpr::VK_DTPREL
@ VK_DTPREL
Definition
HexagonMCExpr.h:20
llvm::HexagonMCExpr::VK_GD_GOT
@ VK_GD_GOT
Definition
HexagonMCExpr.h:21
llvm::HexagonMCExpr::VK_TPREL
@ VK_TPREL
Definition
HexagonMCExpr.h:31
llvm::HexagonMCExpr::VK_IE
@ VK_IE
Definition
HexagonMCExpr.h:25
llvm::HexagonMCExpr::VK_GOTREL
@ VK_GOTREL
Definition
HexagonMCExpr.h:24
llvm::HexagonMCExpr::VK_LD_GOT
@ VK_LD_GOT
Definition
HexagonMCExpr.h:27
llvm::HexagonMCExpr::VK_LO16
@ VK_LO16
Definition
HexagonMCExpr.h:33
llvm::HexagonMCExpr::VK_GPREL
@ VK_GPREL
Definition
HexagonMCExpr.h:35
llvm::HexagonMCExpr::VK_LD_PLT
@ VK_LD_PLT
Definition
HexagonMCExpr.h:28
llvm::HexagonMCExpr::VK_HI16
@ VK_HI16
Definition
HexagonMCExpr.h:34
llvm::HexagonMCExpr::VK_PLT
@ VK_PLT
Definition
HexagonMCExpr.h:30
llvm::HexagonMCExpr::VK_IE_GOT
@ VK_IE_GOT
Definition
HexagonMCExpr.h:26
llvm::HexagonMCExpr::VK_GD_PLT
@ VK_GD_PLT
Definition
HexagonMCExpr.h:22
llvm::HexagonMCExpr::signMismatch
bool signMismatch() const
Definition
HexagonMCExpr.cpp:69
llvm::HexagonMCExpr::mustExtend
bool mustExtend() const
Definition
HexagonMCExpr.cpp:45
llvm::HexagonMCExpr::create
static HexagonMCExpr * create(MCExpr const *Expr, MCContext &Ctx)
Definition
HexagonMCExpr.cpp:21
llvm::HexagonMCExpr::s27_2_reloc
bool s27_2_reloc() const
Definition
HexagonMCExpr.cpp:52
llvm::HexagonMCExpr::evaluateAsRelocatableImpl
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm) const override
Definition
HexagonMCExpr.cpp:25
llvm::HexagonMCExpr::setMustExtend
void setMustExtend(bool Val=true)
Definition
HexagonMCExpr.cpp:40
llvm::HexagonMCExpr::findAssociatedFragment
MCFragment * findAssociatedFragment() const override
Definition
HexagonMCExpr.cpp:34
llvm::HexagonMCExpr::getExpr
MCExpr const * getExpr() const
Definition
HexagonMCExpr.cpp:38
llvm::HexagonMCExpr::setS27_2_reloc
void setS27_2_reloc(bool Val=true)
Definition
HexagonMCExpr.cpp:53
llvm::HexagonMCExpr::setSignMismatch
void setSignMismatch(bool Val=true)
Definition
HexagonMCExpr.cpp:65
llvm::HexagonMCExpr::visitUsedExpr
void visitUsedExpr(MCStreamer &Streamer) const override
Definition
HexagonMCExpr.cpp:30
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:64
llvm::MCAssembler
Definition
MCAssembler.h:49
llvm::MCContext
Context object for machine code objects.
Definition
MCContext.h:83
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition
MCExpr.h:34
llvm::MCFragment
Definition
MCSection.h:45
llvm::MCStreamer
Streaming machine code generation interface.
Definition
MCStreamer.h:220
llvm::MCSymbolRefExpr::FirstTargetSpecifier
@ FirstTargetSpecifier
Definition
MCExpr.h:200
llvm::MCTargetExpr::MCTargetExpr
MCTargetExpr()
Definition
MCExpr.h:469
llvm::MCValue
Definition
MCValue.h:30
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition
raw_ostream.h:53
uint8_t
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
Generated on
for LLVM by
1.14.0