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

Unified Diff: src/IceAssemblerARM32.cpp

Issue 1570543002: Add VMULS and VMULD instructions to integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Show resolved merge conflicts. 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.h ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceAssemblerARM32.cpp
diff --git a/src/IceAssemblerARM32.cpp b/src/IceAssemblerARM32.cpp
index 18dadaab144b720766e4ac570152ec1a40eb34c4..2a3cb1a82e4a0a2976469f0c0ab691baccd187d8 100644
--- a/src/IceAssemblerARM32.cpp
+++ b/src/IceAssemblerARM32.cpp
@@ -2101,6 +2101,36 @@ void AssemblerARM32::vdivd(const Operand *OpDd, const Operand *OpDn,
emitVFPddd(Cond, VdivdOpcode, Dd, Dn, Dm);
}
+void AssemblerARM32::vmuls(const Operand *OpSd, const Operand *OpSn,
+ const Operand *OpSm, CondARM32::Cond Cond) {
+ // VMUL (floating-point) - ARM section A8.8.351, encoding A2:
+ // vmul<c>.f32 <Sd>, <Sn>, <Sm>
+ //
+ // cccc11100D10nnnndddd101sN0M0mmmm where cccc=Cond, s=0, ddddD=Rd, nnnnN=Rn,
+ // and mmmmM=Rm.
+ constexpr const char *Vmuls = "vmuls";
+ IValueT Sd = encodeSRegister(OpSd, "Sd", Vmuls);
+ IValueT Sn = encodeSRegister(OpSn, "Sn", Vmuls);
+ IValueT Sm = encodeSRegister(OpSm, "Sm", Vmuls);
+ constexpr IValueT VmulsOpcode = B21;
+ emitVFPsss(Cond, VmulsOpcode, Sd, Sn, Sm);
+}
+
+void AssemblerARM32::vmuld(const Operand *OpDd, const Operand *OpDn,
+ const Operand *OpDm, CondARM32::Cond Cond) {
+ // VMUL (floating-point) - ARM section A8.8.351, encoding A2:
+ // vmul<c>.f64 <Dd>, <Dn>, <Dm>
+ //
+ // cccc11100D10nnnndddd101sN0M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn,
+ // and Mmmmm=Rm.
+ constexpr const char *Vmuld = "vmuld";
+ IValueT Dd = encodeDRegister(OpDd, "Dd", Vmuld);
+ IValueT Dn = encodeDRegister(OpDn, "Dn", Vmuld);
+ IValueT Dm = encodeDRegister(OpDm, "Dm", Vmuld);
+ constexpr IValueT VmuldOpcode = B21;
+ emitVFPddd(Cond, VmuldOpcode, Dd, Dn, Dm);
+}
+
void AssemblerARM32::vsubs(const Operand *OpSd, const Operand *OpSn,
const Operand *OpSm, CondARM32::Cond Cond) {
// VSUB (floating-point) - ARM section A8.8.415, encoding A2:
« no previous file with comments | « src/IceAssemblerARM32.h ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698