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

Unified Diff: src/IceInstARM32.cpp

Issue 1657353002: Add VAND to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. 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 23216a03455f0d5ef2bbf79e79b2e121ac57ce50..e8cbc7d1b9c987ed0a7ae23cbf6545162b9eeef6 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -633,10 +633,10 @@ template <> void InstARM32Vadd::emitIAS(const Cfg *Func) const {
Asm->vaddqf(Dest, getSrc(0), getSrc(1));
break;
case IceType_f32:
- Asm->vadds(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
+ Asm->vadds(Dest, getSrc(0), getSrc(1), CondARM32::AL);
break;
case IceType_f64:
- Asm->vaddd(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
+ Asm->vaddd(Dest, getSrc(0), getSrc(1), CondARM32::AL);
break;
}
assert(!Asm->needsTextFixup());
@@ -644,7 +644,32 @@ template <> void InstARM32Vadd::emitIAS(const Cfg *Func) const {
template <> void InstARM32Vand::emitIAS(const Cfg *Func) const {
// TODO(kschimpf): add support for these instructions
- emitUsingTextFixup(Func);
+ auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
+ const Variable *Dest = getDest();
+ Type DestTy = Dest->getType();
Jim Stichnoth 2016/02/02 18:46:44 const or just use "switch (Dest->getType())" like
Karl 2016/02/02 19:25:37 Done.
+ switch (DestTy) {
+ case IceType_void:
John 2016/02/02 18:46:28 defaut:?
Karl 2016/02/02 19:25:37 Done.
+ case IceType_i1:
+ case IceType_i8:
+ case IceType_i16:
+ case IceType_i32:
+ case IceType_i64:
+ case IceType_f32:
+ case IceType_f64:
+ case IceType_v4f32:
+ case IceType_NUM:
+ llvm::report_fatal_error("Vand not defined on type " +
+ std::string(typeString(DestTy)));
Jim Stichnoth 2016/02/02 18:46:44 You're getting enough instances of std::string(typ
Karl 2016/02/02 19:25:37 Done.
+ return;
+ case IceType_v4i1:
+ case IceType_v8i1:
+ case IceType_v16i1:
+ case IceType_v16i8:
+ case IceType_v8i16:
+ case IceType_v4i32:
+ Asm->vandq(Dest, getSrc(0), getSrc(1));
+ }
+ assert(!Asm->needsTextFixup());
}
template <> void InstARM32Vdiv::emitIAS(const Cfg *Func) const {

Powered by Google App Engine
This is Rietveld 408576698