LLVM 19.0.0git
XtensaMCExpr.h
Go to the documentation of this file.
1//===-- XtensaMCExpr.h - Xtensa specific MC expression classes --*- C++ -*-===//
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//
11// This file describes Xtensa-specific MCExprs
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_LIB_TARGET_XTENSA_MCTARGETDESC_XTENSAMCEXPR_H
16#define LLVM_LIB_TARGET_XTENSA_MCTARGETDESC_XTENSAMCEXPR_H
17
18#include "llvm/MC/MCExpr.h"
19
20namespace llvm {
21
22class StringRef;
23class XtensaMCExpr : public MCTargetExpr {
24public:
26
27private:
28 const MCExpr *Expr;
29 const VariantKind Kind;
30
31 explicit XtensaMCExpr(const MCExpr *Expr, VariantKind Kind)
32 : Expr(Expr), Kind(Kind) {}
33
34public:
35 static const XtensaMCExpr *create(const MCExpr *Expr, VariantKind Kind,
36 MCContext &Ctx);
37
38 VariantKind getKind() const { return Kind; }
39
40 const MCExpr *getSubExpr() const { return Expr; }
41
42 void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override;
43 bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout,
44 const MCFixup *Fixup) const override;
45 void visitUsedExpr(MCStreamer &Streamer) const override;
48 }
49
50 void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override {}
51
54};
55
56} // end namespace llvm.
57
58#endif // LLVM_LIB_TARGET_XTENSA_MCTARGETDESC_XTENSAMCEXPR_H
PowerPC TLS Dynamic Call Fixup
static const char * name
Definition: SMEABIPass.cpp:49
raw_pwrite_stream & OS
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
Encapsulates the layout of an assembly file at a particular point in time.
Definition: MCAsmLayout.h:28
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
MCFragment * findAssociatedFragment() const
Find the "associated section" for this expression, which is currently defined as the absolute section...
Definition: MCExpr.cpp:1057
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Definition: MCFixup.h:71
Streaming machine code generation interface.
Definition: MCStreamer.h:212
This is an extension point for target-specific MCExpr subclasses to implement.
Definition: MCExpr.h:656
This represents an "assembler immediate".
Definition: MCValue.h:36
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
static const XtensaMCExpr * create(const MCExpr *Expr, VariantKind Kind, MCContext &Ctx)
static VariantKind getVariantKindForName(StringRef name)
VariantKind getKind() const
Definition: XtensaMCExpr.h:38
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
static StringRef getVariantKindName(VariantKind Kind)
MCFragment * findAssociatedFragment() const override
Definition: XtensaMCExpr.h:46
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override
void visitUsedExpr(MCStreamer &Streamer) const override
void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override
Definition: XtensaMCExpr.h:50
const MCExpr * getSubExpr() const
Definition: XtensaMCExpr.h:40
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18