2013-12-26 09:49:59 +08: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.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef SPARCTARGETSTREAMER_H
|
|
|
|
#define SPARCTARGETSTREAMER_H
|
|
|
|
|
|
|
|
#include "llvm/MC/MCELFStreamer.h"
|
|
|
|
#include "llvm/MC/MCStreamer.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class SparcTargetStreamer : public MCTargetStreamer {
|
|
|
|
virtual void anchor();
|
|
|
|
|
|
|
|
public:
|
2014-01-26 14:06:37 +08:00
|
|
|
SparcTargetStreamer(MCStreamer &S);
|
2013-12-26 09:49:59 +08: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 14:06:37 +08:00
|
|
|
SparcTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS);
|
2014-04-29 15:57:13 +08:00
|
|
|
void emitSparcRegisterIgnore(unsigned reg) override;
|
|
|
|
void emitSparcRegisterScratch(unsigned reg) override;
|
2013-12-26 09:49:59 +08:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
// This part is for ELF object output
|
|
|
|
class SparcTargetELFStreamer : public SparcTargetStreamer {
|
|
|
|
public:
|
2014-01-26 14:06:37 +08:00
|
|
|
SparcTargetELFStreamer(MCStreamer &S);
|
2013-12-26 09:49:59 +08:00
|
|
|
MCELFStreamer &getStreamer();
|
2014-04-29 15:57:13 +08:00
|
|
|
void emitSparcRegisterIgnore(unsigned reg) override {}
|
|
|
|
void emitSparcRegisterScratch(unsigned reg) override {}
|
2013-12-26 09:49:59 +08:00
|
|
|
};
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|