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

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: 1) Fix alignment in type table. 2) Add VECT128_BYTES constant. 3) add _movp() function. 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..bbe26fe922d438ce5de03dba81e414b2a5511506 100644
--- a/src/IceTargetLoweringX8632.h
+++ b/src/IceTargetLoweringX8632.h
@@ -133,6 +133,8 @@ protected:
}
static Type stackSlotType();
+ Variable *copyToReg(Operand *Src, int32_t RegNum = Variable::NoRegister);
+
// The following are helpers that insert lowered x86 instructions
// with minimal syntactic overhead, so that the lowering code can
// look as close to assembly as practical.
@@ -199,6 +201,9 @@ protected:
Context.insert(InstX8632Mov::create(Func, Dest, Src0));
}
}
+ void _movp(Variable *Dest, Operand *Src0) {
+ Context.insert(InstX8632Movp::create(Func, Dest, Src0));
+ }
void _movq(Variable *Dest, Operand *Src0) {
Context.insert(InstX8632Movq::create(Func, Dest, Src0));
}
@@ -288,11 +293,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