| Index: src/IceInstX86Base.h
|
| diff --git a/src/IceInstX86Base.h b/src/IceInstX86Base.h
|
| index de7b4052f8f1b9a2003d8958142e9cb0d202473b..e2e204cc16a39df4e84d36cae38ebc476f47931c 100644
|
| --- a/src/IceInstX86Base.h
|
| +++ b/src/IceInstX86Base.h
|
| @@ -66,6 +66,7 @@ public:
|
| Divps,
|
| Divss,
|
| FakeRMW,
|
| + GetIP,
|
| Fld,
|
| Fstp,
|
| Icmp,
|
| @@ -239,6 +240,27 @@ private:
|
| InstArithmetic::OpKind Op, Variable *Beacon);
|
| };
|
|
|
| +template <class Machine>
|
| +class InstX86GetIP final : public InstX86Base<Machine> {
|
| + 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<Machine>::isClassof(Inst, InstX86Base<Machine>::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
|
|
|