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

Unified Diff: src/IceAssemblerARM32.cpp

Issue 1568623003: Add VSUB{S,D} instructions to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add comments to DART assembler. 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 396f8f8b1cb0311a97e65ecef296c9a0e709471a..a260a1e85d68a6fd7e544410517823a0fc635f65 100644
--- a/src/IceAssemblerARM32.cpp
+++ b/src/IceAssemblerARM32.cpp
@@ -2071,6 +2071,36 @@ void AssemblerARM32::vaddd(const Operand *OpDd, const Operand *OpDn,
emitVFPddd(Cond, VadddOpcode, 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:
+ // vsub<c>.f32 <Sd>, <Sn>, <Sm>
+ //
+ // cccc11100D11nnnndddd101sN1M0mmmm where cccc=Cond, s=0, ddddD=Rd, nnnnN=Rn,
+ // and mmmmM=Rm.
+ constexpr const char *Vadds = "vsubs";
+ IValueT Sd = encodeSRegister(OpSd, "Sd", Vadds);
+ IValueT Sn = encodeSRegister(OpSn, "Sn", Vadds);
+ IValueT Sm = encodeSRegister(OpSm, "Sm", Vadds);
+ constexpr IValueT VaddsOpcode = B21 | B20 | B6;
+ emitVFPsss(Cond, VaddsOpcode, Sd, Sn, Sm);
+}
+
+void AssemblerARM32::vsubd(const Operand *OpDd, const Operand *OpDn,
+ const Operand *OpDm, CondARM32::Cond Cond) {
+ // VSUB (floating-point) - ARM section A8.8.415, encoding A2:
+ // vadd<c>.f64 <Dd>, <Dn>, <Dm>
+ //
+ // cccc11100D11nnnndddd101sN1M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn,
+ // and Mmmmm=Rm.
+ constexpr const char *Vaddd = "vsubd";
+ IValueT Dd = encodeDRegister(OpDd, "Dd", Vaddd);
+ IValueT Dn = encodeDRegister(OpDn, "Dn", Vaddd);
+ IValueT Dm = encodeDRegister(OpDm, "Dm", Vaddd);
+ constexpr IValueT VadddOpcode = B21 | B20 | B6;
+ emitVFPddd(Cond, VadddOpcode, Dd, Dn, Dm);
+}
+
void AssemblerARM32::emitVStackOp(CondARM32::Cond Cond, IValueT Opcode,
const Variable *OpBaseReg,
SizeT NumConsecRegs) {
« 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