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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/IceAssemblerARM32.h ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceAssemblerARM32.cpp - Assembler for ARM32 --*- C++ -*-===// 1 //===- subzero/src/IceAssemblerARM32.cpp - Assembler for ARM32 --*- C++ -*-===//
2 // 2 //
3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 4 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 5 // BSD-style license that can be found in the LICENSE file.
6 // 6 //
7 // Modified by the Subzero authors. 7 // Modified by the Subzero authors.
8 // 8 //
9 //===----------------------------------------------------------------------===// 9 //===----------------------------------------------------------------------===//
10 // 10 //
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 // cccc11101D00nnnndddd101sN0M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn, 2094 // cccc11101D00nnnndddd101sN0M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn,
2095 // and Mmmmm=Rm. 2095 // and Mmmmm=Rm.
2096 constexpr const char *Vdivd = "vdivd"; 2096 constexpr const char *Vdivd = "vdivd";
2097 IValueT Dd = encodeDRegister(OpDd, "Dd", Vdivd); 2097 IValueT Dd = encodeDRegister(OpDd, "Dd", Vdivd);
2098 IValueT Dn = encodeDRegister(OpDn, "Dn", Vdivd); 2098 IValueT Dn = encodeDRegister(OpDn, "Dn", Vdivd);
2099 IValueT Dm = encodeDRegister(OpDm, "Dm", Vdivd); 2099 IValueT Dm = encodeDRegister(OpDm, "Dm", Vdivd);
2100 constexpr IValueT VdivdOpcode = B23; 2100 constexpr IValueT VdivdOpcode = B23;
2101 emitVFPddd(Cond, VdivdOpcode, Dd, Dn, Dm); 2101 emitVFPddd(Cond, VdivdOpcode, Dd, Dn, Dm);
2102 } 2102 }
2103 2103
2104 void AssemblerARM32::vmuls(const Operand *OpSd, const Operand *OpSn,
2105 const Operand *OpSm, CondARM32::Cond Cond) {
2106 // VMUL (floating-point) - ARM section A8.8.351, encoding A2:
2107 // vmul<c>.f32 <Sd>, <Sn>, <Sm>
2108 //
2109 // cccc11100D10nnnndddd101sN0M0mmmm where cccc=Cond, s=0, ddddD=Rd, nnnnN=Rn,
2110 // and mmmmM=Rm.
2111 constexpr const char *Vmuls = "vmuls";
2112 IValueT Sd = encodeSRegister(OpSd, "Sd", Vmuls);
2113 IValueT Sn = encodeSRegister(OpSn, "Sn", Vmuls);
2114 IValueT Sm = encodeSRegister(OpSm, "Sm", Vmuls);
2115 constexpr IValueT VmulsOpcode = B21;
2116 emitVFPsss(Cond, VmulsOpcode, Sd, Sn, Sm);
2117 }
2118
2119 void AssemblerARM32::vmuld(const Operand *OpDd, const Operand *OpDn,
2120 const Operand *OpDm, CondARM32::Cond Cond) {
2121 // VMUL (floating-point) - ARM section A8.8.351, encoding A2:
2122 // vmul<c>.f64 <Dd>, <Dn>, <Dm>
2123 //
2124 // cccc11100D10nnnndddd101sN0M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn,
2125 // and Mmmmm=Rm.
2126 constexpr const char *Vmuld = "vmuld";
2127 IValueT Dd = encodeDRegister(OpDd, "Dd", Vmuld);
2128 IValueT Dn = encodeDRegister(OpDn, "Dn", Vmuld);
2129 IValueT Dm = encodeDRegister(OpDm, "Dm", Vmuld);
2130 constexpr IValueT VmuldOpcode = B21;
2131 emitVFPddd(Cond, VmuldOpcode, Dd, Dn, Dm);
2132 }
2133
2104 void AssemblerARM32::vsubs(const Operand *OpSd, const Operand *OpSn, 2134 void AssemblerARM32::vsubs(const Operand *OpSd, const Operand *OpSn,
2105 const Operand *OpSm, CondARM32::Cond Cond) { 2135 const Operand *OpSm, CondARM32::Cond Cond) {
2106 // VSUB (floating-point) - ARM section A8.8.415, encoding A2: 2136 // VSUB (floating-point) - ARM section A8.8.415, encoding A2:
2107 // vsub<c>.f32 <Sd>, <Sn>, <Sm> 2137 // vsub<c>.f32 <Sd>, <Sn>, <Sm>
2108 // 2138 //
2109 // cccc11100D11nnnndddd101sN1M0mmmm where cccc=Cond, s=0, ddddD=Rd, nnnnN=Rn, 2139 // cccc11100D11nnnndddd101sN1M0mmmm where cccc=Cond, s=0, ddddD=Rd, nnnnN=Rn,
2110 // and mmmmM=Rm. 2140 // and mmmmM=Rm.
2111 constexpr const char *Vsubs = "vsubs"; 2141 constexpr const char *Vsubs = "vsubs";
2112 IValueT Sd = encodeSRegister(OpSd, "Sd", Vsubs); 2142 IValueT Sd = encodeSRegister(OpSd, "Sd", Vsubs);
2113 IValueT Sn = encodeSRegister(OpSn, "Sn", Vsubs); 2143 IValueT Sn = encodeSRegister(OpSn, "Sn", Vsubs);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
2173 // 2203 //
2174 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and 2204 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and
2175 // iiiiiiii=NumConsecRegs. 2205 // iiiiiiii=NumConsecRegs.
2176 constexpr IValueT VpushOpcode = 2206 constexpr IValueT VpushOpcode =
2177 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9; 2207 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9;
2178 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs); 2208 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs);
2179 } 2209 }
2180 2210
2181 } // end of namespace ARM32 2211 } // end of namespace ARM32
2182 } // end of namespace Ice 2212 } // end of namespace Ice
OLDNEW
« 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