mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
642eccbb21
All string occurences for "sparc", "Sparc" and "SPARC" were already replaced, with the exception of ELF constans in the object file descriptor as it will get removed later on (we won't be building ELF object files for the 6502).
47 lines
1.5 KiB
C++
47 lines
1.5 KiB
C++
//===-- Mos6502TargetStreamer.cpp - Mos6502 Target Streamer Methods -----------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file provides Mos6502 specific target streamer methods.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "Mos6502TargetStreamer.h"
|
|
#include "InstPrinter/Mos6502InstPrinter.h"
|
|
#include "llvm/Support/FormattedStream.h"
|
|
|
|
using namespace llvm;
|
|
|
|
// pin vtable to this file
|
|
Mos6502TargetStreamer::Mos6502TargetStreamer(MCStreamer &S) : MCTargetStreamer(S) {}
|
|
|
|
void Mos6502TargetStreamer::anchor() {}
|
|
|
|
Mos6502TargetAsmStreamer::Mos6502TargetAsmStreamer(MCStreamer &S,
|
|
formatted_raw_ostream &OS)
|
|
: Mos6502TargetStreamer(S), OS(OS) {}
|
|
|
|
void Mos6502TargetAsmStreamer::emitMos6502RegisterIgnore(unsigned reg) {
|
|
OS << "\t.register "
|
|
<< "%" << StringRef(Mos6502InstPrinter::getRegisterName(reg)).lower()
|
|
<< ", #ignore\n";
|
|
}
|
|
|
|
void Mos6502TargetAsmStreamer::emitMos6502RegisterScratch(unsigned reg) {
|
|
OS << "\t.register "
|
|
<< "%" << StringRef(Mos6502InstPrinter::getRegisterName(reg)).lower()
|
|
<< ", #scratch\n";
|
|
}
|
|
|
|
Mos6502TargetELFStreamer::Mos6502TargetELFStreamer(MCStreamer &S)
|
|
: Mos6502TargetStreamer(S) {}
|
|
|
|
MCELFStreamer &Mos6502TargetELFStreamer::getStreamer() {
|
|
return static_cast<MCELFStreamer &>(Streamer);
|
|
}
|