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

Unified Diff: src/IceInst.h

Issue 1876413002: Subzero. WASM. Additional progress. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Merging with master Created 4 years, 8 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
Index: src/IceInst.h
diff --git a/src/IceInst.h b/src/IceInst.h
index 1b49419eaab27f5e10001cddf382e124b59fe928..4ff3453752b1601902d1ff7a20661d39944a4f32 100644
--- a/src/IceInst.h
+++ b/src/IceInst.h
@@ -68,6 +68,7 @@ public:
FakeUse, // not part of LLVM/PNaCl bitcode
FakeKill, // not part of LLVM/PNaCl bitcode
JumpTable, // not part of LLVM/PNaCl bitcode
+ Breakpoint, // not part of LLVM/PNaCl bitcode
Jim Stichnoth 2016/04/14 20:03:44 Sort this - between Assign and BundleLock
Eric Holk 2016/04/15 15:24:26 Done.
// Anything >= Target is an InstTarget subclass. Note that the value-spaces
// are shared across targets. To avoid confusion over the definition of
// shared values, an object specific to one target should never be passed
@@ -976,6 +977,29 @@ private:
GlobalString FuncName;
};
+/// This instruction inserts an unconditional breakpoint.
+///
John 2016/04/12 20:34:27 What's the use case for this? I would think that s
Eric Holk 2016/04/12 21:30:10 I used it when I was debugging indirect calls. I h
+/// On x86, this assembles into an INT 3 instruction.
+///
+/// This instruction is primarily meant for debugging the code generator.
+class InstBreakpoint : public InstHighLevel {
+public:
+ InstBreakpoint() = delete;
+ InstBreakpoint(const InstBreakpoint &) = delete;
+ InstBreakpoint &operator=(const InstBreakpoint &) = delete;
+
+ InstBreakpoint(Cfg *Func);
+
+public:
+ static InstBreakpoint *create(Cfg *Func) {
+ return new (Func->allocate<InstBreakpoint>()) InstBreakpoint(Func);
+ }
+
+ static bool classof(const Inst *Instr) {
+ return Instr->getKind() == Breakpoint;
+ }
+};
+
/// The Target instruction is the base class for all target-specific
/// instructions.
class InstTarget : public Inst {

Powered by Google App Engine
This is Rietveld 408576698