LLVM 24.0.0git
LoongArchELFStreamer.h
Go to the documentation of this file.
1//==-- LoongArchELFStreamer.h - LoongArch ELF Target Streamer --*- 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_LOONGARCH_MCTARGETDESC_LOONGARCHELFSTREAMER_H
10#define LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHELFSTREAMER_H
11
14
15namespace llvm {
16
18public:
21
22 void emitDirectiveOptionPush() override;
23 void emitDirectiveOptionPop() override;
24 void emitDirectiveOptionRelax() override;
25 void emitDirectiveOptionNoRelax() override;
26 void emitDTPRel32Value(const MCExpr *) override;
27 void emitDTPRel64Value(const MCExpr *) override;
28
29 void finish() override;
30};
31
33public:
34 LoongArchELFStreamer(MCContext &C, std::unique_ptr<MCAsmBackend> MAB,
35 std::unique_ptr<MCObjectWriter> MOW,
36 std::unique_ptr<MCCodeEmitter> MCE)
37 : MCELFStreamer(C, std::move(MAB), std::move(MOW), std::move(MCE)) {}
38
39 void emitCodeAlignment(Align Alignment, const MCSubtargetInfo &STI,
40 unsigned MaxBytesToEmit) override;
41};
42
43MCELFStreamer *createLoongArchELFStreamer(MCContext &C,
44 std::unique_ptr<MCAsmBackend> MAB,
45 std::unique_ptr<MCObjectWriter> MOW,
46 std::unique_ptr<MCCodeEmitter> MCE);
47} // end namespace llvm
48#endif
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
void emitCodeAlignment(Align Alignment, const MCSubtargetInfo &STI, unsigned MaxBytesToEmit) override
Emit nops until the byte alignment ByteAlignment is reached.
LoongArchELFStreamer(MCContext &C, std::unique_ptr< MCAsmBackend > MAB, std::unique_ptr< MCObjectWriter > MOW, std::unique_ptr< MCCodeEmitter > MCE)
void emitDTPRel32Value(const MCExpr *) override
void emitDTPRel64Value(const MCExpr *) override
LoongArchTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
Context object for machine code objects.
Definition MCContext.h:83
MCELFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter)
Base class for the full range of assembler expressions which are needed for parsing.
Definition MCExpr.h:34
Streaming machine code generation interface.
Definition MCStreamer.h:222
Generic base class for all target subtargets.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition STLExtras.h:1917
MCELFStreamer * createLoongArchELFStreamer(MCContext &C, std::unique_ptr< MCAsmBackend > MAB, std::unique_ptr< MCObjectWriter > MOW, std::unique_ptr< MCCodeEmitter > MCE)
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:878
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition Alignment.h:39