LLVM  14.0.0git
SparcTargetStreamer.h
Go to the documentation of this file.
1 //===-- SparcTargetStreamer.h - Sparc 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_SPARC_MCTARGETDESC_SPARCTARGETSTREAMER_H
10 #define LLVM_LIB_TARGET_SPARC_MCTARGETDESC_SPARCTARGETSTREAMER_H
11 
12 #include "llvm/MC/MCELFStreamer.h"
13 #include "llvm/MC/MCStreamer.h"
14 
15 namespace llvm {
16 
17 class formatted_raw_ostream;
18 
20  virtual void anchor();
21 
22 public:
24  /// Emit ".register <reg>, #ignore".
25  virtual void emitSparcRegisterIgnore(unsigned reg) = 0;
26  /// Emit ".register <reg>, #scratch".
27  virtual void emitSparcRegisterScratch(unsigned reg) = 0;
28 };
29 
30 // This part is for ascii assembly output
33 
34 public:
36  void emitSparcRegisterIgnore(unsigned reg) override;
37  void emitSparcRegisterScratch(unsigned reg) override;
38 };
39 
40 // This part is for ELF object output
42 public:
45  void emitSparcRegisterIgnore(unsigned reg) override {}
46  void emitSparcRegisterScratch(unsigned reg) override {}
47 };
48 } // end namespace llvm
49 
50 #endif
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::SparcTargetELFStreamer::emitSparcRegisterIgnore
void emitSparcRegisterIgnore(unsigned reg) override
Emit ".register <reg>, #ignore".
Definition: SparcTargetStreamer.h:45
MCELFStreamer.h
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:199
llvm::SparcTargetStreamer
Definition: SparcTargetStreamer.h:19
llvm::MCELFStreamer
Definition: MCELFStreamer.h:24
llvm::MCTargetStreamer
Target specific streamer interface.
Definition: MCStreamer.h:91
llvm::SparcTargetAsmStreamer::emitSparcRegisterScratch
void emitSparcRegisterScratch(unsigned reg) override
Emit ".register <reg>, #scratch".
Definition: SparcTargetStreamer.cpp:34
llvm::SparcTargetELFStreamer::SparcTargetELFStreamer
SparcTargetELFStreamer(MCStreamer &S)
Definition: SparcTargetStreamer.cpp:40
llvm::SparcTargetELFStreamer::emitSparcRegisterScratch
void emitSparcRegisterScratch(unsigned reg) override
Emit ".register <reg>, #scratch".
Definition: SparcTargetStreamer.h:46
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::SparcTargetStreamer::emitSparcRegisterScratch
virtual void emitSparcRegisterScratch(unsigned reg)=0
Emit ".register <reg>, #scratch".
llvm::SparcTargetStreamer::emitSparcRegisterIgnore
virtual void emitSparcRegisterIgnore(unsigned reg)=0
Emit ".register <reg>, #ignore".
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::SparcTargetELFStreamer::getStreamer
MCELFStreamer & getStreamer()
Definition: SparcTargetStreamer.cpp:43
llvm::SparcTargetELFStreamer
Definition: SparcTargetStreamer.h:41
llvm::SparcTargetAsmStreamer::emitSparcRegisterIgnore
void emitSparcRegisterIgnore(unsigned reg) override
Emit ".register <reg>, #ignore".
Definition: SparcTargetStreamer.cpp:28
llvm::SparcTargetAsmStreamer::SparcTargetAsmStreamer
SparcTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
Definition: SparcTargetStreamer.cpp:24
MCStreamer.h
llvm::SparcTargetAsmStreamer
Definition: SparcTargetStreamer.h:31
llvm::SparcTargetStreamer::SparcTargetStreamer
SparcTargetStreamer(MCStreamer &S)
Definition: SparcTargetStreamer.cpp:20