OLD | NEW |
1 //===- ARMMCNaClExpander.h --------------------------------------*- C++ -*-===// | 1 //===- ARMMCNaClExpander.h --------------------------------------*- C++ -*-===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file declares the ARMMCNaClExpander class, the ARM specific | 10 // This file declares the ARMMCNaClExpander class, the ARM specific |
(...skipping 16 matching lines...) Expand all Loading... |
27 namespace ARM { | 27 namespace ARM { |
28 class ARMMCNaClExpander : public MCNaClExpander { | 28 class ARMMCNaClExpander : public MCNaClExpander { |
29 public: | 29 public: |
30 ARMMCNaClExpander(const MCContext &Ctx, std::unique_ptr<MCRegisterInfo> &&RI, | 30 ARMMCNaClExpander(const MCContext &Ctx, std::unique_ptr<MCRegisterInfo> &&RI, |
31 std::unique_ptr<MCInstrInfo> &&II) | 31 std::unique_ptr<MCInstrInfo> &&II) |
32 : MCNaClExpander(Ctx, std::move(RI), std::move(II)) {} | 32 : MCNaClExpander(Ctx, std::move(RI), std::move(II)) {} |
33 | 33 |
34 bool expandInst(const MCInst &Inst, MCStreamer &Out, | 34 bool expandInst(const MCInst &Inst, MCStreamer &Out, |
35 const MCSubtargetInfo &STI) override; | 35 const MCSubtargetInfo &STI) override; |
36 | 36 |
| 37 protected: |
| 38 bool isValidScratchRegister(unsigned Reg) const override; |
| 39 |
37 private: | 40 private: |
38 bool Guard = false; // recursion guard | 41 bool Guard = false; // recursion guard |
39 int SaveCount = 0; | 42 int SaveCount = 0; |
40 | 43 |
41 void expandIndirectBranch(const MCInst &Inst, MCStreamer &Out, | 44 void expandIndirectBranch(const MCInst &Inst, MCStreamer &Out, |
42 const MCSubtargetInfo &STI, bool isCall); | 45 const MCSubtargetInfo &STI, bool isCall); |
43 | 46 |
44 void expandCall(const MCInst &Inst, MCStreamer &Out, | 47 void expandCall(const MCInst &Inst, MCStreamer &Out, |
45 const MCSubtargetInfo &STI); | 48 const MCSubtargetInfo &STI); |
46 | 49 |
47 void doExpandInst(const MCInst &Inst, MCStreamer &Out, | 50 void doExpandInst(const MCInst &Inst, MCStreamer &Out, |
48 const MCSubtargetInfo &STI); | 51 const MCSubtargetInfo &STI); |
49 }; | 52 }; |
50 } | 53 } |
51 } | 54 } |
52 #endif | 55 #endif |
OLD | NEW |