LLVM  14.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_RISCVTARGETSTREAMER_H
10 #define LLVM_LIB_TARGET_RISCV_RISCVTARGETSTREAMER_H
11 
12 #include "llvm/MC/MCStreamer.h"
14 
15 namespace llvm {
16 
17 class formatted_raw_ostream;
18 
20 public:
22  void finish() override;
23 
24  virtual void emitDirectiveOptionPush();
25  virtual void emitDirectiveOptionPop();
26  virtual void emitDirectiveOptionPIC();
27  virtual void emitDirectiveOptionNoPIC();
28  virtual void emitDirectiveOptionRVC();
29  virtual void emitDirectiveOptionNoRVC();
30  virtual void emitDirectiveOptionRelax();
31  virtual void emitDirectiveOptionNoRelax();
32  virtual void emitAttribute(unsigned Attribute, unsigned Value);
33  virtual void finishAttributeSection();
34  virtual void emitTextAttribute(unsigned Attribute, StringRef String);
35  virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue,
36  StringRef StringValue);
37 
38  void emitTargetAttributes(const MCSubtargetInfo &STI);
39 };
40 
41 // This part is for ascii assembly output
44 
45  void finishAttributeSection() override;
46  void emitAttribute(unsigned Attribute, unsigned Value) override;
47  void emitTextAttribute(unsigned Attribute, StringRef String) override;
48  void emitIntTextAttribute(unsigned Attribute, unsigned IntValue,
49  StringRef StringValue) override;
50 
51 public:
53 
54  void emitDirectiveOptionPush() override;
55  void emitDirectiveOptionPop() override;
56  void emitDirectiveOptionPIC() override;
57  void emitDirectiveOptionNoPIC() override;
58  void emitDirectiveOptionRVC() override;
59  void emitDirectiveOptionNoRVC() override;
60  void emitDirectiveOptionRelax() override;
61  void emitDirectiveOptionNoRelax() override;
62 };
63 
64 }
65 #endif
llvm::RISCVTargetStreamer::emitAttribute
virtual void emitAttribute(unsigned Attribute, unsigned Value)
Definition: RISCVTargetStreamer.cpp:34
llvm::RISCVTargetStreamer::emitDirectiveOptionRelax
virtual void emitDirectiveOptionRelax()
Definition: RISCVTargetStreamer.cpp:32
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::RISCVTargetAsmStreamer::emitDirectiveOptionRVC
void emitDirectiveOptionRVC() override
Definition: RISCVTargetStreamer.cpp:84
llvm::RISCVTargetStreamer::emitTargetAttributes
void emitTargetAttributes(const MCSubtargetInfo &STI)
Definition: RISCVTargetStreamer.cpp:42
llvm::Attribute
Definition: Attributes.h:52
llvm::RISCVTargetStreamer::emitDirectiveOptionNoRVC
virtual void emitDirectiveOptionNoRVC()
Definition: RISCVTargetStreamer.cpp:31
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:199
llvm::RISCVTargetStreamer::emitTextAttribute
virtual void emitTextAttribute(unsigned Attribute, StringRef String)
Definition: RISCVTargetStreamer.cpp:36
llvm::RISCVTargetStreamer::emitDirectiveOptionPop
virtual void emitDirectiveOptionPop()
Definition: RISCVTargetStreamer.cpp:27
MCSubtargetInfo.h
llvm::MCTargetStreamer
Target specific streamer interface.
Definition: MCStreamer.h:91
llvm::RISCVTargetAsmStreamer::emitDirectiveOptionRelax
void emitDirectiveOptionRelax() override
Definition: RISCVTargetStreamer.cpp:92
llvm::RISCVTargetStreamer::emitDirectiveOptionNoRelax
virtual void emitDirectiveOptionNoRelax()
Definition: RISCVTargetStreamer.cpp:33
llvm::RISCVTargetStreamer::RISCVTargetStreamer
RISCVTargetStreamer(MCStreamer &S)
Definition: RISCVTargetStreamer.cpp:22
llvm::RISCVTargetStreamer::emitDirectiveOptionPIC
virtual void emitDirectiveOptionPIC()
Definition: RISCVTargetStreamer.cpp:28
llvm::formatted_raw_ostream
formatted_raw_ostream - A raw_ostream that wraps another one and keeps track of line and column posit...
Definition: FormattedStream.h:30
llvm::RISCVTargetStreamer::emitDirectiveOptionNoPIC
virtual void emitDirectiveOptionNoPIC()
Definition: RISCVTargetStreamer.cpp:29
llvm::RISCVTargetAsmStreamer::emitDirectiveOptionNoRelax
void emitDirectiveOptionNoRelax() override
Definition: RISCVTargetStreamer.cpp:96
llvm::RISCVTargetAsmStreamer
Definition: RISCVTargetStreamer.h:42
llvm::RISCVTargetStreamer::finishAttributeSection
virtual void finishAttributeSection()
Definition: RISCVTargetStreamer.cpp:35
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::RISCVTargetAsmStreamer::RISCVTargetAsmStreamer
RISCVTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
Definition: RISCVTargetStreamer.cpp:64
llvm::RISCVTargetAsmStreamer::emitDirectiveOptionPop
void emitDirectiveOptionPop() override
Definition: RISCVTargetStreamer.cpp:72
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::RISCVTargetStreamer::finish
void finish() override
Definition: RISCVTargetStreamer.cpp:24
llvm::RISCVTargetStreamer::emitDirectiveOptionRVC
virtual void emitDirectiveOptionRVC()
Definition: RISCVTargetStreamer.cpp:30
llvm::RISCVTargetAsmStreamer::emitDirectiveOptionPIC
void emitDirectiveOptionPIC() override
Definition: RISCVTargetStreamer.cpp:76
llvm::RISCVTargetAsmStreamer::emitDirectiveOptionNoRVC
void emitDirectiveOptionNoRVC() override
Definition: RISCVTargetStreamer.cpp:88
llvm::RISCVTargetStreamer::emitIntTextAttribute
virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue)
Definition: RISCVTargetStreamer.cpp:38
MCStreamer.h
llvm::RISCVTargetStreamer
Definition: RISCVTargetStreamer.h:19
llvm::RISCVTargetAsmStreamer::emitDirectiveOptionPush
void emitDirectiveOptionPush() override
Definition: RISCVTargetStreamer.cpp:68
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition: MCSubtargetInfo.h:75
llvm::Value
LLVM Value Representation.
Definition: Value.h:75
llvm::RISCVTargetAsmStreamer::emitDirectiveOptionNoPIC
void emitDirectiveOptionNoPIC() override
Definition: RISCVTargetStreamer.cpp:80
llvm::RISCVTargetStreamer::emitDirectiveOptionPush
virtual void emitDirectiveOptionPush()
Definition: RISCVTargetStreamer.cpp:26