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

Unified Diff: src/IceInstARM32.cpp

Issue 1568933002: Add VDIVS and VDIVD instructions to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add test case. 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 b961bfc5bb8c7f97127aaf08a87de0e4ab507898..59edde331a87d1c2af040e2823591a9440a8f561 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -615,6 +615,24 @@ template <> void InstARM32Vadd::emitIAS(const Cfg *Func) const {
assert(!Asm->needsTextFixup());
}
+template <> void InstARM32Vdiv::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.
+ Asm->setNeedsTextFixup();
+ break;
+ case IceType_f32:
+ Asm->vdivs(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
+ break;
+ case IceType_f64:
+ Asm->vdivd(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
+ break;
+ }
+ assert(!Asm->needsTextFixup());
+}
+
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