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

Unified Diff: src/IceTargetLoweringX8632.h

Issue 401523003: Lower insertelement and extractelement. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 6 years, 5 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 | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX8632.h
diff --git a/src/IceTargetLoweringX8632.h b/src/IceTargetLoweringX8632.h
index 58d87819a33bbb9f2b2a708397211874562e1d9a..fefc7fd8d6f67180db99d08dacfd21bd19008021 100644
--- a/src/IceTargetLoweringX8632.h
+++ b/src/IceTargetLoweringX8632.h
@@ -82,9 +82,11 @@ protected:
virtual void lowerBr(const InstBr *Inst);
virtual void lowerCall(const InstCall *Inst);
virtual void lowerCast(const InstCast *Inst);
+ virtual void lowerExtractElement(const InstExtractElement *Inst);
virtual void lowerFcmp(const InstFcmp *Inst);
virtual void lowerIcmp(const InstIcmp *Inst);
virtual void lowerIntrinsicCall(const InstIntrinsicCall *Inst);
+ virtual void lowerInsertElement(const InstInsertElement *Inst);
virtual void lowerLoad(const InstLoad *Inst);
virtual void lowerPhi(const InstPhi *Inst);
virtual void lowerRet(const InstRet *Inst);
@@ -152,6 +154,10 @@ protected:
Variable *makeVectorOfZeros(Type Ty, int32_t RegNum = Variable::NoRegister);
Variable *makeVectorOfOnes(Type Ty, int32_t RegNum = Variable::NoRegister);
+ // Return a memory operand corresponding to a stack allocated Variable.
+ OperandX8632Mem *getMemoryOperandForStackSlot(Type Ty, Variable *Slot,
+ uint32_t Offset = 0);
+
// 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.
@@ -237,6 +243,9 @@ protected:
void _imul(Variable *Dest, Operand *Src0) {
Context.insert(InstX8632Imul::create(Func, Dest, Src0));
}
+ void _lea(Variable *Dest, Operand *Src0) {
+ Context.insert(InstX8632Lea::create(Func, Dest, Src0));
+ }
void _mfence() { Context.insert(InstX8632Mfence::create(Func)); }
// If Dest=NULL is passed in, then a new variable is created, marked
// as infinite register allocation weight, and returned through the
@@ -249,12 +258,18 @@ protected:
Context.insert(InstX8632Mov::create(Func, Dest, Src0));
}
}
+ void _movd(Variable *Dest, Operand *Src0) {
+ Context.insert(InstX8632Movd::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));
}
+ void _movss(Variable *Dest, Operand *Src0) {
+ Context.insert(InstX8632Movss::create(Func, Dest, Src0));
+ }
void _movsx(Variable *Dest, Operand *Src0) {
Context.insert(InstX8632Movsx::create(Func, Dest, Src0));
}
@@ -288,6 +303,12 @@ protected:
void _pcmpgt(Variable *Dest, Operand *Src0) {
Context.insert(InstX8632Pcmpgt::create(Func, Dest, Src0));
}
+ void _pextrw(Variable *Dest, Operand *Src0, Operand *Src1) {
+ Context.insert(InstX8632Pextrw::create(Func, Dest, Src0, Src1));
+ }
+ void _pinsrw(Variable *Dest, Operand *Src0, Operand *Src1) {
+ Context.insert(InstX8632Pinsrw::create(Func, Dest, Src0, Src1));
+ }
void _pmullw(Variable *Dest, Operand *Src0) {
Context.insert(InstX8632Pmullw::create(Func, Dest, Src0));
}
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698