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

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: 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 5f4991f001d2cabb7cbabb9963d0204a22b999f3..3d1d87f9bee97efb396894f3c0f9233433eabb26 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -641,6 +641,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.
+ Asm->setNeedsTextFixup();
+ break;
+ case IceType_f32:
+ Asm->vmlas(getDest(), getSrc(1), getSrc(2), CondARM32::AL);
John 2016/01/26 19:13:15 perhaps assert(!Asm->needsTextFixup()); here (an
Karl 2016/01/26 20:38:39 Done.
+ break;
+ case IceType_f64:
+ Asm->vmlad(getDest(), getSrc(1), getSrc(2), CondARM32::AL);
+ break;
+ }
+ if (Asm->needsTextFixup())
+ emitUsingTextFixup(Func);
+}
+
template <> void InstARM32Vsub::emitIAS(const Cfg *Func) const {
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
const Variable *Dest = getDest();

Powered by Google App Engine
This is Rietveld 408576698