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

Unified Diff: src/IceTargetLoweringX8632.h

Issue 353553004: Add support for vector types and vector constants. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 6 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
Index: src/IceTargetLoweringX8632.h
diff --git a/src/IceTargetLoweringX8632.h b/src/IceTargetLoweringX8632.h
index 972b29f7b4fecca3405abf3fe33c3b1f21c5e0f6..12fcbc31e77ae7967ab94732e0376be360741d45 100644
--- a/src/IceTargetLoweringX8632.h
+++ b/src/IceTargetLoweringX8632.h
@@ -195,6 +195,8 @@ protected:
int32_t RegNum = Variable::NoRegister) {
if (Dest == NULL) {
Dest = legalizeToVar(Src0, false, RegNum);
+ } else if (typeNumElements(Dest->getType()) > 1) {
+ Context.insert(InstX8632Movp::create(Func, Dest, Src0));
jvoung (off chromium) 2014/06/26 00:45:41 I wonder if this should just be a separate _movp()
wala 2014/06/26 17:32:42 I'll add a _movp function. However, there are a fe
jvoung (off chromium) 2014/06/26 23:33:46 Okay, yeah I was worried there might be some recur
} else {
Context.insert(InstX8632Mov::create(Func, Dest, Src0));
}
@@ -288,11 +290,15 @@ private:
TargetX8632(const TargetX8632 &) LLVM_DELETED_FUNCTION;
TargetX8632 &operator=(const TargetX8632 &) LLVM_DELETED_FUNCTION;
virtual ~TargetX8632() {}
- template <typename T> void emitConstantPool() const;
+ template <typename T> void emitScalarConstantPool() const;
+ void emitVectorConstantPool() const;
};
+template <> void ConstantInteger::emit(GlobalContext *Ctx) const;
template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
+template <> void ConstantVector::emit(GlobalContext *Ctx) const;
+template <> void ConstantBitVector::emit(GlobalContext *Ctx) const;
} // end of namespace Ice

Powered by Google App Engine
This is Rietveld 408576698