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

Unified Diff: src/IceInstARM32.cpp

Issue 1665593002: Add VMUL vector instructions to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 11 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/IceInstARM32.cpp
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp
index 312a3d11844b9613c6fb09959ffea335bc1f4d9c..3b8278774f4c38818fbb00cd1779540cfac24eb5 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -621,7 +621,6 @@ template <> void InstARM32Vadd::emitIAS(const Cfg *Func) const {
default:
llvm::report_fatal_error("Vadd not defined on type " +
typeIceString(DestTy));
- break;
case IceType_v16i8:
case IceType_v8i16:
case IceType_v4i32:
@@ -778,20 +777,28 @@ template <> void InstARM32Vsub::emitIAS(const Cfg *Func) const {
template <> void InstARM32Vmul::emitIAS(const Cfg *Func) const {
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
const Variable *Dest = getDest();
- switch (Dest->getType()) {
+ const Type DestTy = Dest->getType();
+ switch (DestTy) {
default:
- // TODO(kschimpf) Figure if more cases are needed.
- emitUsingTextFixup(Func);
- return;
+ llvm::report_fatal_error("Vmul not defined on type " +
+ typeIceString(DestTy));
+
+ case IceType_v16i8:
+ case IceType_v8i16:
+ case IceType_v4i32:
+ Asm->vmulqi(typeElementType(DestTy), Dest, getSrc(0), getSrc(1));
+ break;
+ case IceType_v4f32:
+ Asm->vmulqf(Dest, getSrc(0), getSrc(1));
+ break;
case IceType_f32:
- Asm->vmuls(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
- assert(!Asm->needsTextFixup());
- return;
+ Asm->vmuls(Dest, getSrc(0), getSrc(1), CondARM32::AL);
+ break;
case IceType_f64:
- Asm->vmuld(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
- assert(!Asm->needsTextFixup());
- return;
+ Asm->vmuld(Dest, getSrc(0), getSrc(1), CondARM32::AL);
+ break;
}
+ assert(!Asm->needsTextFixup());
}
InstARM32Call::InstARM32Call(Cfg *Func, Variable *Dest, Operand *CallTarget)

Powered by Google App Engine
This is Rietveld 408576698