Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: src/IceInstARM32.h

Issue 1655313002: Subzero: ARM32: lowering of vector insert and extract. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: No more auto. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceInstARM32.cpp » ('j') | src/IceInstARM32.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstARM32.h
diff --git a/src/IceInstARM32.h b/src/IceInstARM32.h
index 2be562aaf5701f0d2c9a709a10b99c772eddc06b..56ca8af6aba425ef8aac0a2e45b6557ead1019e3 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,
@@ -1349,6 +1352,62 @@ 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) {
+ assert(Index < typeNumElements(Src0->getType()));
+ 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) {
+ assert(Index < typeNumElements(Dest->getType()));
+ addSource(Src0);
+ }
+
+ const uint32_t Index;
+};
+
class InstARM32Vcmp final : public InstARM32Pred {
InstARM32Vcmp() = delete;
InstARM32Vcmp(const InstARM32Vcmp &) = delete;
« no previous file with comments | « no previous file | src/IceInstARM32.cpp » ('j') | src/IceInstARM32.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698