Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.h

Issue 1274223003: Auto-sandboxing: Switch to automatic scratch register invalidation (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: add flag to tests Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/MC/MCParser/NaClAsmParser.cpp ('k') | lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 bool mayModifyStack(const MCInst &Inst); 50 bool mayModifyStack(const MCInst &Inst);
48 51
49 void expandStackManipulation(const MCInst &Inst, MCStreamer &Out, 52 void expandStackManipulation(const MCInst &Inst, MCStreamer &Out,
50 const MCSubtargetInfo &STI); 53 const MCSubtargetInfo &STI);
51 54
52 void doExpandInst(const MCInst &Inst, MCStreamer &Out, 55 void doExpandInst(const MCInst &Inst, MCStreamer &Out,
53 const MCSubtargetInfo &STI); 56 const MCSubtargetInfo &STI);
54 }; 57 };
55 } 58 }
56 } 59 }
57 #endif 60 #endif
OLDNEW
« no previous file with comments | « lib/MC/MCParser/NaClAsmParser.cpp ('k') | lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698