2013-12-26 01:49:59 +00:00
|
|
|
//===-- SparcTargetStreamer.h - Sparc Target Streamer ----------*- C++ -*--===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_SPARC_SPARCTARGETSTREAMER_H
|
|
|
|
#define LLVM_LIB_TARGET_SPARC_SPARCTARGETSTREAMER_H
|
2013-12-26 01:49:59 +00:00
|
|
|
|
|
|
|
#include "llvm/MC/MCELFStreamer.h"
|
|
|
|
#include "llvm/MC/MCStreamer.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class SparcTargetStreamer : public MCTargetStreamer {
|
|
|
|
virtual void anchor();
|
|
|
|
|
|
|
|
public:
|
2014-01-26 06:06:37 +00:00
|
|
|
SparcTargetStreamer(MCStreamer &S);
|
2013-12-26 01:49:59 +00:00
|
|
|
/// Emit ".register <reg>, #ignore".
|
|
|
|
virtual void emitSparcRegisterIgnore(unsigned reg) = 0;
|
|
|
|
/// Emit ".register <reg>, #scratch".
|
|
|
|
virtual void emitSparcRegisterScratch(unsigned reg) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
// This part is for ascii assembly output
|
|
|
|
class SparcTargetAsmStreamer : public SparcTargetStreamer {
|
|
|
|
formatted_raw_ostream &OS;
|
|
|
|
|
|
|
|
public:
|
2014-01-26 06:06:37 +00:00
|
|
|
SparcTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS);
|
2014-04-29 07:57:13 +00:00
|
|
|
void emitSparcRegisterIgnore(unsigned reg) override;
|
|
|
|
void emitSparcRegisterScratch(unsigned reg) override;
|
2013-12-26 01:49:59 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
// This part is for ELF object output
|
|
|
|
class SparcTargetELFStreamer : public SparcTargetStreamer {
|
|
|
|
public:
|
2014-01-26 06:06:37 +00:00
|
|
|
SparcTargetELFStreamer(MCStreamer &S);
|
2013-12-26 01:49:59 +00:00
|
|
|
MCELFStreamer &getStreamer();
|
2014-04-29 07:57:13 +00:00
|
|
|
void emitSparcRegisterIgnore(unsigned reg) override {}
|
|
|
|
void emitSparcRegisterScratch(unsigned reg) override {}
|
2013-12-26 01:49:59 +00:00
|
|
|
};
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|