Index: src/IceInstARM32.h |
diff --git a/src/IceInstARM32.h b/src/IceInstARM32.h |
index 21505a185045fd2267d2d80ddf293bb971cbf65a..151c966b1cf4f5885589e4f34af91922716fe1c4 100644 |
--- a/src/IceInstARM32.h |
+++ b/src/IceInstARM32.h |
@@ -23,6 +23,7 @@ |
#include "IceInst.h" |
#include "IceInstARM32.def" |
#include "IceOperand.h" |
+#include "IceRegistersARM32.h" |
namespace Ice { |
namespace ARM32 { |
@@ -389,6 +390,8 @@ public: |
Cmp, |
Dmb, |
Eor, |
+ Extract, |
+ Insert, |
Label, |
Ldr, |
Ldrex, |
@@ -1353,6 +1356,60 @@ private: |
Variable *DestHi = nullptr; |
}; |
+/// Generates vmov Rd, Dn[x] instructions, and their related floating point |
+/// versions. |
+class InstARM32Extract final : public InstARM32Pred { |
+ InstARM32Extract() = delete; |
+ InstARM32Extract(const InstARM32Extract &) = delete; |
+ InstARM32Extract &operator=(const InstARM32Extract &) = delete; |
+ |
+public: |
+ static InstARM32Extract *create(Cfg *Func, Variable *Dest, Variable *Src0, |
+ uint32_t Index, CondARM32::Cond Predicate) { |
+ return new (Func->allocate<InstARM32Extract>()) |
+ InstARM32Extract(Func, Dest, Src0, Index, Predicate); |
+ } |
+ void emit(const Cfg *Func) const override; |
+ static bool classof(const Inst *Inst) { return isClassof(Inst, Extract); } |
+ |
+private: |
+ InstARM32Extract(Cfg *Func, Variable *Dest, Variable *Src0, uint32_t Index, |
+ CondARM32::Cond Predicate) |
+ : InstARM32Pred(Func, InstARM32::Extract, 1, Dest, Predicate), |
+ Index(Index) { |
+ addSource(Src0); |
+ } |
+ |
+ const uint32_t Index; |
+}; |
+ |
+/// Generates vmov Dn[x], Rd instructions, and their related floating point |
+/// versions. |
+class InstARM32Insert final : public InstARM32Pred { |
+ InstARM32Insert() = delete; |
+ InstARM32Insert(const InstARM32Insert &) = delete; |
+ InstARM32Insert &operator=(const InstARM32Insert &) = delete; |
+ |
+public: |
+ static InstARM32Insert *create(Cfg *Func, Variable *Dest, Variable *Src0, |
+ uint32_t Index, CondARM32::Cond Predicate) { |
+ return new (Func->allocate<InstARM32Insert>()) |
+ InstARM32Insert(Func, Dest, Src0, Index, Predicate); |
+ } |
+ void emit(const Cfg *Func) const override; |
+ static bool classof(const Inst *Inst) { return isClassof(Inst, Insert); } |
+ |
+private: |
+ InstARM32Insert(Cfg *Func, Variable *Dest, Variable *Src0, uint32_t Index, |
+ CondARM32::Cond Predicate) |
+ : InstARM32Pred(Func, InstARM32::Insert, 1, Dest, Predicate), |
+ Index(Index) { |
+ addSource(Src0); |
+ } |
+ |
+ const uint32_t Index; |
+}; |
+ |
class InstARM32Vcmp final : public InstARM32Pred { |
InstARM32Vcmp() = delete; |
InstARM32Vcmp(const InstARM32Vcmp &) = delete; |