Index: src/IceInst.h |
diff --git a/src/IceInst.h b/src/IceInst.h |
index 1b49419eaab27f5e10001cddf382e124b59fe928..db273aa500c7f17e8eadb38bae559aaabe9d7a8c 100644 |
--- a/src/IceInst.h |
+++ b/src/IceInst.h |
@@ -62,6 +62,7 @@ public: |
Store, |
Switch, |
Assign, // not part of LLVM/PNaCl bitcode |
+ Breakpoint, // not part of LLVM/PNaCl bitcode |
BundleLock, // not part of LLVM/PNaCl bitcode |
BundleUnlock, // not part of LLVM/PNaCl bitcode |
FakeDef, // not part of LLVM/PNaCl bitcode |
@@ -976,6 +977,29 @@ private: |
GlobalString FuncName; |
}; |
+/// This instruction inserts an unconditional breakpoint. |
+/// |
+/// 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 { |