Chromium Code Reviews| 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 { |