LLVM 17.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"
15#include "llvm/MC/MCRegister.h"
17
18using namespace llvm;
19
20// pin vtable to this file
22
23void SparcTargetStreamer::anchor() {}
24
27 : SparcTargetStreamer(S), OS(OS) {}
28
30 OS << "\t.register "
32 << ", #ignore\n";
33}
34
36 OS << "\t.register "
38 << ", #scratch\n";
39}
40
43
45 return static_cast<MCELFStreamer &>(Streamer);
46}
Streaming machine code generation interface.
Definition: MCStreamer.h:212
Target specific streamer interface.
Definition: MCStreamer.h:93
MCStreamer & Streamer
Definition: MCStreamer.h:95
static const char * getRegisterName(MCRegister Reg)
void emitSparcRegisterIgnore(unsigned reg) override
Emit ".register <reg>, #ignore".
SparcTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
void emitSparcRegisterScratch(unsigned reg) override
Emit ".register <reg>, #scratch".
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
std::string lower() const
Definition: StringRef.cpp:111
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