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

Unified Diff: include/llvm/MC/MCNaClExpander.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/MC/MCNaClExpander.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/llvm/MC/MCNaClExpander.h
diff --git a/include/llvm/MC/MCNaClExpander.h b/include/llvm/MC/MCNaClExpander.h
index e471636755ec34d06fd34c15f9479e72eacaf7da..f84342876ff08abf6007483bdc035d43be3f04e7 100644
--- a/include/llvm/MC/MCNaClExpander.h
+++ b/include/llvm/MC/MCNaClExpander.h
@@ -34,6 +34,10 @@ private:
protected:
std::unique_ptr<MCInstrInfo> InstInfo;
std::unique_ptr<MCRegisterInfo> RegInfo;
+ void invalidateScratchRegs(const MCInst &Inst);
+ unsigned getScratchReg(int index);
+ unsigned numScratchRegs() const;
+ virtual bool isValidScratchRegister(unsigned Reg) const = 0;
public:
MCNaClExpander(const MCContext &Ctx, std::unique_ptr<MCRegisterInfo> &&RI,
@@ -42,10 +46,8 @@ public:
void Error(const MCInst &Inst, const char msg[]);
- void pushScratchReg(unsigned Reg);
- unsigned popScratchReg();
- unsigned getScratchReg(int index);
- unsigned numScratchRegs() const;
+ bool addScratchReg(unsigned Reg);
+ void clearScratchRegs();
bool isPseudo(const MCInst &Inst) const;
« no previous file with comments | « no previous file | lib/MC/MCNaClExpander.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698