Venkatraman Govindaraju | bf683fd | 2013-12-26 01:49:59 +0000 | [diff] [blame^] | 1 | //===-- SparcTargetStreamer.h - Sparc Target Streamer ----------*- C++ -*--===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef SPARCTARGETSTREAMER_H |
| 11 | #define SPARCTARGETSTREAMER_H |
| 12 | |
| 13 | #include "llvm/MC/MCELFStreamer.h" |
| 14 | #include "llvm/MC/MCStreamer.h" |
| 15 | |
| 16 | namespace llvm { |
| 17 | class SparcTargetStreamer : public MCTargetStreamer { |
| 18 | virtual void anchor(); |
| 19 | |
| 20 | public: |
| 21 | /// Emit ".register <reg>, #ignore". |
| 22 | virtual void emitSparcRegisterIgnore(unsigned reg) = 0; |
| 23 | /// Emit ".register <reg>, #scratch". |
| 24 | virtual void emitSparcRegisterScratch(unsigned reg) = 0; |
| 25 | }; |
| 26 | |
| 27 | // This part is for ascii assembly output |
| 28 | class SparcTargetAsmStreamer : public SparcTargetStreamer { |
| 29 | formatted_raw_ostream &OS; |
| 30 | |
| 31 | public: |
| 32 | SparcTargetAsmStreamer(formatted_raw_ostream &OS); |
| 33 | virtual void emitSparcRegisterIgnore(unsigned reg); |
| 34 | virtual void emitSparcRegisterScratch(unsigned reg); |
| 35 | |
| 36 | }; |
| 37 | |
| 38 | // This part is for ELF object output |
| 39 | class SparcTargetELFStreamer : public SparcTargetStreamer { |
| 40 | public: |
| 41 | MCELFStreamer &getStreamer(); |
| 42 | virtual void emitSparcRegisterIgnore(unsigned reg) {} |
| 43 | virtual void emitSparcRegisterScratch(unsigned reg) {} |
| 44 | }; |
| 45 | } // end namespace llvm |
| 46 | |
| 47 | #endif |