LLVM  14.0.0git
SparcTargetStreamer.cpp
Go to the documentation of this file.
1 //===-- SparcTargetStreamer.cpp - Sparc Target Streamer Methods -----------===//
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 // This file provides Sparc specific target streamer methods.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "SparcTargetStreamer.h"
14 #include "SparcInstPrinter.h"
16 
17 using namespace llvm;
18 
19 // pin vtable to this file
21 
22 void SparcTargetStreamer::anchor() {}
23 
26  : SparcTargetStreamer(S), OS(OS) {}
27 
29  OS << "\t.register "
31  << ", #ignore\n";
32 }
33 
35  OS << "\t.register "
37  << ", #scratch\n";
38 }
39 
42 
44  return static_cast<MCELFStreamer &>(Streamer);
45 }
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
SparcInstPrinter.h
FormattedStream.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::SparcInstPrinter::getRegisterName
static const char * getRegisterName(unsigned RegNo)
llvm::MCTargetStreamer::Streamer
MCStreamer & Streamer
Definition: MCStreamer.h:93
llvm::StringRef::lower
LLVM_NODISCARD std::string lower() const
Definition: StringRef.cpp:105
llvm::SparcTargetELFStreamer::SparcTargetELFStreamer
SparcTargetELFStreamer(MCStreamer &S)
Definition: SparcTargetStreamer.cpp:40
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
SparcTargetStreamer.h
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
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::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
llvm::SparcTargetStreamer::SparcTargetStreamer
SparcTargetStreamer(MCStreamer &S)
Definition: SparcTargetStreamer.cpp:20