LLVM 17.0.0git
RISCVTargetStreamer.h
Go to the documentation of this file.
1//===-- RISCVTargetStreamer.h - RISCV 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_RISCV_MCTARGETDESC_RISCVTARGETSTREAMER_H
10#define LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVTARGETSTREAMER_H
11
12#include "RISCV.h"
13#include "llvm/MC/MCStreamer.h"
15
16namespace llvm {
17
18class formatted_raw_ostream;
19
22
23public:
25 void finish() override;
26 virtual void reset();
27
28 virtual void emitDirectiveOptionPush();
29 virtual void emitDirectiveOptionPop();
30 virtual void emitDirectiveOptionPIC();
31 virtual void emitDirectiveOptionNoPIC();
32 virtual void emitDirectiveOptionRVC();
33 virtual void emitDirectiveOptionNoRVC();
34 virtual void emitDirectiveOptionRelax();
35 virtual void emitDirectiveOptionNoRelax();
36 virtual void emitDirectiveVariantCC(MCSymbol &Symbol);
37 virtual void emitAttribute(unsigned Attribute, unsigned Value);
38 virtual void finishAttributeSection();
39 virtual void emitTextAttribute(unsigned Attribute, StringRef String);
40 virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue,
41 StringRef StringValue);
42
45 RISCVABI::ABI getTargetABI() const { return TargetABI; }
46};
47
48// This part is for ascii assembly output
51
52 void finishAttributeSection() override;
53 void emitAttribute(unsigned Attribute, unsigned Value) override;
54 void emitTextAttribute(unsigned Attribute, StringRef String) override;
55 void emitIntTextAttribute(unsigned Attribute, unsigned IntValue,
56 StringRef StringValue) override;
57
58public:
60
61 void emitDirectiveOptionPush() override;
62 void emitDirectiveOptionPop() override;
63 void emitDirectiveOptionPIC() override;
64 void emitDirectiveOptionNoPIC() override;
65 void emitDirectiveOptionRVC() override;
66 void emitDirectiveOptionNoRVC() override;
67 void emitDirectiveOptionRelax() override;
68 void emitDirectiveOptionNoRelax() override;
69 void emitDirectiveVariantCC(MCSymbol &Symbol) override;
70};
71
72}
73#endif
Streaming machine code generation interface.
Definition: MCStreamer.h:212
Generic base class for all target subtargets.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
Target specific streamer interface.
Definition: MCStreamer.h:93
void emitDirectiveVariantCC(MCSymbol &Symbol) override
virtual void emitDirectiveOptionNoRelax()
void emitTargetAttributes(const MCSubtargetInfo &STI)
virtual void emitAttribute(unsigned Attribute, unsigned Value)
RISCVABI::ABI getTargetABI() const
virtual void emitTextAttribute(unsigned Attribute, StringRef String)
virtual void emitDirectiveVariantCC(MCSymbol &Symbol)
virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue)
void setTargetABI(RISCVABI::ABI ABI)
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
LLVM Value Representation.
Definition: Value.h:74
formatted_raw_ostream - A raw_ostream that wraps another one and keeps track of line and column posit...
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18