LLVM API Documentation
00001 //===-- SparcTargetStreamer.h - Sparc Target Streamer ----------*- C++ -*--===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 00010 #ifndef LLVM_LIB_TARGET_SPARC_SPARCTARGETSTREAMER_H 00011 #define LLVM_LIB_TARGET_SPARC_SPARCTARGETSTREAMER_H 00012 00013 #include "llvm/MC/MCELFStreamer.h" 00014 #include "llvm/MC/MCStreamer.h" 00015 00016 namespace llvm { 00017 class SparcTargetStreamer : public MCTargetStreamer { 00018 virtual void anchor(); 00019 00020 public: 00021 SparcTargetStreamer(MCStreamer &S); 00022 /// Emit ".register <reg>, #ignore". 00023 virtual void emitSparcRegisterIgnore(unsigned reg) = 0; 00024 /// Emit ".register <reg>, #scratch". 00025 virtual void emitSparcRegisterScratch(unsigned reg) = 0; 00026 }; 00027 00028 // This part is for ascii assembly output 00029 class SparcTargetAsmStreamer : public SparcTargetStreamer { 00030 formatted_raw_ostream &OS; 00031 00032 public: 00033 SparcTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS); 00034 void emitSparcRegisterIgnore(unsigned reg) override; 00035 void emitSparcRegisterScratch(unsigned reg) override; 00036 00037 }; 00038 00039 // This part is for ELF object output 00040 class SparcTargetELFStreamer : public SparcTargetStreamer { 00041 public: 00042 SparcTargetELFStreamer(MCStreamer &S); 00043 MCELFStreamer &getStreamer(); 00044 void emitSparcRegisterIgnore(unsigned reg) override {} 00045 void emitSparcRegisterScratch(unsigned reg) override {} 00046 }; 00047 } // end namespace llvm 00048 00049 #endif