LLVM 17.0.0git
RISCVTargetStreamer.h
Go to the documentation of this file.
1//===-- RISCVTargetStreamer.h - RISC-V 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);
38 bool &PrefixEmitted);
39 virtual void emitDirectiveOptionArchPlus(StringRef Value, bool &PrefixEmitted,
40 bool EmitComma);
42 bool &PrefixEmitted,
43 bool EmitComma);
44 virtual void emitAttribute(unsigned Attribute, unsigned Value);
45 virtual void finishAttributeSection();
46 virtual void emitTextAttribute(unsigned Attribute, StringRef String);
47 virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue,
48 StringRef StringValue);
49
50 void emitTargetAttributes(const MCSubtargetInfo &STI, bool EmitStackAlign);
52 RISCVABI::ABI getTargetABI() const { return TargetABI; }
53};
54
55// This part is for ascii assembly output
58
59 void finishAttributeSection() override;
60 void emitAttribute(unsigned Attribute, unsigned Value) override;
61 void emitTextAttribute(unsigned Attribute, StringRef String) override;
62 void emitIntTextAttribute(unsigned Attribute, unsigned IntValue,
63 StringRef StringValue) override;
64
65public:
67
68 void emitDirectiveOptionPush() override;
69 void emitDirectiveOptionPop() override;
70 void emitDirectiveOptionPIC() override;
71 void emitDirectiveOptionNoPIC() override;
72 void emitDirectiveOptionRVC() override;
73 void emitDirectiveOptionNoRVC() override;
74 void emitDirectiveOptionRelax() override;
75 void emitDirectiveOptionNoRelax() override;
76 void emitDirectiveVariantCC(MCSymbol &Symbol) override;
78 bool &PrefixEmitted) override;
79 void emitDirectiveOptionArchPlus(StringRef Value, bool &PrefixEmitted,
80 bool EmitComma) override;
81 void emitDirectiveOptionArchMinus(StringRef Value, bool &PrefixEmitted,
82 bool EmitComma) override;
83};
84
85}
86#endif
raw_pwrite_stream & OS
@ ABI
Definition: TextStubV5.cpp:100
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 emitDirectiveOptionArchPlus(StringRef Value, bool &PrefixEmitted, bool EmitComma) override
void emitDirectiveOptionArchMinus(StringRef Value, bool &PrefixEmitted, bool EmitComma) override
void emitDirectiveOptionArchFullArch(StringRef Value, bool &PrefixEmitted) override
void emitDirectiveVariantCC(MCSymbol &Symbol) override
virtual void emitDirectiveOptionNoRelax()
virtual void emitAttribute(unsigned Attribute, unsigned Value)
RISCVABI::ABI getTargetABI() const
virtual void emitTextAttribute(unsigned Attribute, StringRef String)
virtual void emitDirectiveOptionArchFullArch(StringRef Value, bool &PrefixEmitted)
virtual void emitDirectiveVariantCC(MCSymbol &Symbol)
void emitTargetAttributes(const MCSubtargetInfo &STI, bool EmitStackAlign)
virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue)
virtual void emitDirectiveOptionArchPlus(StringRef Value, bool &PrefixEmitted, bool EmitComma)
void setTargetABI(RISCVABI::ABI ABI)
virtual void emitDirectiveOptionArchMinus(StringRef Value, bool &PrefixEmitted, bool EmitComma)
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