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

Unified Diff: src/IceInstARM32.cpp

Issue 1651263002: Add VSUB vector instruction 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
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/sub-vec.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstARM32.cpp
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp
index db412a8b8aa89ed278018c6cd9f7913201bf4e04..cd0c2f163d848ec5364cd8da6a082f05230029fe 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -728,20 +728,37 @@ template <> void InstARM32Vorr::emitIAS(const Cfg *Func) const {
template <> void InstARM32Vsub::emitIAS(const Cfg *Func) const {
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
const Variable *Dest = getDest();
- switch (Dest->getType()) {
- default:
- // TODO(kschimpf) Figure if more cases are needed.
- emitUsingTextFixup(Func);
+ Type DestTy = Dest->getType();
+ switch (DestTy) {
+ case IceType_void:
+ case IceType_i1:
+ case IceType_i8:
+ case IceType_i16:
+ case IceType_i32:
+ case IceType_i64:
+ case IceType_v4i1:
+ case IceType_v8i1:
+ case IceType_v16i1:
+ case IceType_NUM:
+ llvm::report_fatal_error("Vsub not defined on type " +
+ std::string(typeString(DestTy)));
+ break;
+ case IceType_v16i8:
+ case IceType_v8i16:
+ case IceType_v4i32:
+ Asm->vsubqi(typeElementType(DestTy), Dest, getSrc(0), getSrc(1));
+ break;
+ case IceType_v4f32:
+ Asm->vsubqf(Dest, getSrc(0), getSrc(1));
break;
case IceType_f32:
Asm->vsubs(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
- assert(!Asm->needsTextFixup());
break;
case IceType_f64:
Asm->vsubd(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
- assert(!Asm->needsTextFixup());
break;
}
+ assert(!Asm->needsTextFixup());
}
template <> void InstARM32Vmul::emitIAS(const Cfg *Func) const {
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/sub-vec.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698