| OLD | NEW |
| 1 //===- X86MCNaClExpander.h --------------------------------------*- C++ -*-===// | 1 //===- X86MCNaClExpander.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 X86MCNaClExpander class, the X86 specific | 10 // This file declares the X86MCNaClExpander class, the X86 specific |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 namespace X86 { | 28 namespace X86 { |
| 29 class X86MCNaClExpander : public MCNaClExpander { | 29 class X86MCNaClExpander : public MCNaClExpander { |
| 30 public: | 30 public: |
| 31 X86MCNaClExpander(const MCContext &Ctx, std::unique_ptr<MCRegisterInfo> &&RI, | 31 X86MCNaClExpander(const MCContext &Ctx, std::unique_ptr<MCRegisterInfo> &&RI, |
| 32 std::unique_ptr<MCInstrInfo> &&II, bool Is64Bit) | 32 std::unique_ptr<MCInstrInfo> &&II, bool Is64Bit) |
| 33 : MCNaClExpander(Ctx, std::move(RI), std::move(II)), Is64Bit(Is64Bit) {} | 33 : MCNaClExpander(Ctx, std::move(RI), std::move(II)), Is64Bit(Is64Bit) {} |
| 34 | 34 |
| 35 bool expandInst(const MCInst &Inst, MCStreamer &Out, | 35 bool expandInst(const MCInst &Inst, MCStreamer &Out, |
| 36 const MCSubtargetInfo &STI) override; | 36 const MCSubtargetInfo &STI) override; |
| 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 bool Is64Bit = false; | 42 bool Is64Bit = false; |
| 40 SmallVector<MCInst, 4> Prefixes; | 43 SmallVector<MCInst, 4> Prefixes; |
| 41 | 44 |
| 42 void emitPrefixes(MCStreamer &Out, const MCSubtargetInfo &STI); | 45 void emitPrefixes(MCStreamer &Out, const MCSubtargetInfo &STI); |
| 43 | 46 |
| 44 void expandIndirectBranch(const MCInst &Inst, MCStreamer &Out, | 47 void expandIndirectBranch(const MCInst &Inst, MCStreamer &Out, |
| 45 const MCSubtargetInfo &STI); | 48 const MCSubtargetInfo &STI); |
| 46 | 49 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 73 void emitSandboxBranchReg(unsigned Reg, MCStreamer &Out, | 76 void emitSandboxBranchReg(unsigned Reg, MCStreamer &Out, |
| 74 const MCSubtargetInfo &STI); | 77 const MCSubtargetInfo &STI); |
| 75 void emitIndirectJumpReg(unsigned Reg, MCStreamer &Out, | 78 void emitIndirectJumpReg(unsigned Reg, MCStreamer &Out, |
| 76 const MCSubtargetInfo &STI); | 79 const MCSubtargetInfo &STI); |
| 77 void emitIndirectCallReg(unsigned Reg, MCStreamer &Out, | 80 void emitIndirectCallReg(unsigned Reg, MCStreamer &Out, |
| 78 const MCSubtargetInfo &STI); | 81 const MCSubtargetInfo &STI); |
| 79 }; | 82 }; |
| 80 } | 83 } |
| 81 } | 84 } |
| 82 #endif | 85 #endif |
| OLD | NEW |