/src/keystone/llvm/lib/Target/Sparc/SparcTargetStreamer.h
Line | Count | Source (jump to first uncovered line) |
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 LLVM_LIB_TARGET_SPARC_SPARCTARGETSTREAMER_H |
11 | | #define LLVM_LIB_TARGET_SPARC_SPARCTARGETSTREAMER_H |
12 | | |
13 | | #include "llvm/MC/MCELFStreamer.h" |
14 | | #include "llvm/MC/MCStreamer.h" |
15 | | |
16 | | namespace llvm_ks { |
17 | | class SparcTargetStreamer : public MCTargetStreamer { |
18 | | public: |
19 | | SparcTargetStreamer(MCStreamer &S); |
20 | | /// Emit ".register <reg>, #ignore". |
21 | | virtual void emitSparcRegisterIgnore(unsigned reg) = 0; |
22 | | /// Emit ".register <reg>, #scratch". |
23 | | virtual void emitSparcRegisterScratch(unsigned reg) = 0; |
24 | | }; |
25 | | |
26 | | // This part is for ascii assembly output |
27 | | class SparcTargetAsmStreamer : public SparcTargetStreamer { |
28 | | formatted_raw_ostream &OS; |
29 | | |
30 | | public: |
31 | | SparcTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS); |
32 | | void emitSparcRegisterIgnore(unsigned reg) override; |
33 | | void emitSparcRegisterScratch(unsigned reg) override; |
34 | | |
35 | | }; |
36 | | |
37 | | // This part is for ELF object output |
38 | | class SparcTargetELFStreamer : public SparcTargetStreamer { |
39 | | public: |
40 | | SparcTargetELFStreamer(MCStreamer &S); |
41 | | MCELFStreamer &getStreamer(); |
42 | 0 | void emitSparcRegisterIgnore(unsigned reg) override {} |
43 | 0 | void emitSparcRegisterScratch(unsigned reg) override {} |
44 | | }; |
45 | | } // end namespace llvm_ks |
46 | | |
47 | | #endif |