Index: src/IceInstX86Base.h |
diff --git a/src/IceInstX86Base.h b/src/IceInstX86Base.h |
index 8cefabb3afdeea7ff2d9e0a8952fc7ded8365ab2..c4a9fe4cbcae6e40bceae7581010677c08c03d41 100644 |
--- a/src/IceInstX86Base.h |
+++ b/src/IceInstX86Base.h |
@@ -101,6 +101,7 @@ template <typename TraitsType> struct InstImpl { |
FakeRMW, |
Fld, |
Fstp, |
+ GetIP, |
Icmp, |
Idiv, |
Imul, |
@@ -265,6 +266,26 @@ template <typename TraitsType> struct InstImpl { |
InstArithmetic::OpKind Op, Variable *Beacon); |
}; |
+ class InstX86GetIP final : public InstX86Base { |
+ InstX86GetIP() = delete; |
+ InstX86GetIP(const InstX86GetIP &) = delete; |
+ InstX86GetIP &operator=(const InstX86GetIP &) = delete; |
+ |
+ public: |
+ static InstX86GetIP *create(Cfg *Func, Variable *Dest) { |
+ return new (Func->allocate<InstX86GetIP>()) InstX86GetIP(Func, Dest); |
+ } |
+ void emit(const Cfg *Func) const override; |
+ void emitIAS(const Cfg *Func) const override; |
+ void dump(const Cfg *Func) const override; |
+ static bool classof(const Inst *Inst) { |
+ return InstX86Base::isClassof(Inst, InstX86Base::GetIP); |
+ } |
+ |
+ private: |
+ InstX86GetIP(Cfg *Func, Variable *Dest); |
+ }; |
+ |
/// InstX86Label represents an intra-block label that is the target of an |
/// intra-block branch. The offset between the label and the branch must be |
/// fit into one byte (considered "near"). These are used for lowering i1 |
@@ -2771,6 +2792,7 @@ template <typename TraitsType> struct InstImpl { |
/// |
/// using Insts = ::Ice::X86NAMESPACE::Insts<TraitsType>; |
template <typename TraitsType> struct Insts { |
+ using GetIP = typename InstImpl<TraitsType>::InstX86GetIP; |
using FakeRMW = typename InstImpl<TraitsType>::InstX86FakeRMW; |
using Label = typename InstImpl<TraitsType>::InstX86Label; |