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

Unified Diff: src/IceInstARM32.cpp

Issue 1634913005: Add VMLA (floating point) 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
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/vmla.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 f6e4ae5afd4eaa3c374b68d84e614d816a9748b2..a8d0efaa8253496a6fa1e8cbee475a8db296c9f7 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -642,6 +642,27 @@ template <> void InstARM32Veor::emitIAS(const Cfg *Func) const {
assert(!Asm->needsTextFixup());
}
+template <> void InstARM32Vmla::emitIAS(const Cfg *Func) const {
+ // Note: Dest == getSrc(0) for four address FP instructions.
+ assert(getSrcSize() == 3);
+ auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
+ const Variable *Dest = getDest();
+ switch (Dest->getType()) {
+ default:
+ // TODO(kschimpf) Figure out how vector operations apply.
+ emitUsingTextFixup(Func);
+ break;
+ case IceType_f32:
+ Asm->vmlas(getDest(), getSrc(1), getSrc(2), CondARM32::AL);
+ assert(!Asm->needsTextFixup());
+ break;
+ case IceType_f64:
+ Asm->vmlad(getDest(), getSrc(1), getSrc(2), CondARM32::AL);
+ assert(!Asm->needsTextFixup());
+ break;
+ }
+}
+
template <> void InstARM32Vsub::emitIAS(const Cfg *Func) const {
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
const Variable *Dest = getDest();
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/vmla.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698