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

Unified Diff: src/IceTargetLoweringARM32.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: Fixes 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 | « src/IceRegistersARM32.h ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringARM32.h
diff --git a/src/IceTargetLoweringARM32.h b/src/IceTargetLoweringARM32.h
index 00f1483264d714d80b78d1c15eda0f1ad6a461af..b35649c6e83713e43522d7e63b7ea6ef0271497d 100644
--- a/src/IceTargetLoweringARM32.h
+++ b/src/IceTargetLoweringARM32.h
@@ -85,13 +85,18 @@ public:
const llvm::SmallBitVector &
getRegistersForVariable(const Variable *Var) const override {
RegClass RC = Var->getRegClass();
- assert(RC < RC_Target);
- return TypeToRegisterSet[RC];
+ switch (RC) {
+ default:
+ assert(RC < RC_Target);
+ return TypeToRegisterSet[RC];
+ case RegARM32::RCARM32_QtoS:
+ return TypeToRegisterSet[RC];
+ }
}
const llvm::SmallBitVector &
getAllRegistersForVariable(const Variable *Var) const override {
RegClass RC = Var->getRegClass();
- assert(RC < RC_Target);
+ assert((RegARM32::RegClassARM32)RC < RegARM32::RCARM32_NUM);
return TypeToRegisterSetUnfiltered[RC];
}
const llvm::SmallBitVector &getAliasesForRegister(SizeT Reg) const override {
@@ -413,6 +418,20 @@ protected:
}
}
+ // Generates a vmov instruction to extract the given index from a vector
+ // register.
+ void _extractelement(Variable *Dest, Variable *Src0, uint32_t Index,
+ CondARM32::Cond Pred = CondARM32::AL) {
+ Context.insert<InstARM32Extract>(Dest, Src0, Index, Pred);
+ }
+
+ // Generates a vmov instruction to insert a value into the given index of a
+ // vector register.
+ void _insertelement(Variable *Dest, Variable *Src0, uint32_t Index,
+ CondARM32::Cond Pred = CondARM32::AL) {
+ Context.insert<InstARM32Insert>(Dest, Src0, Index, Pred);
+ }
+
// --------------------------------------------------------------------------
// Begin bool folding machinery.
//
« no previous file with comments | « src/IceRegistersARM32.h ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698