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

Side by Side Diff: src/IceAssemblerARM32.cpp

Issue 1604043005: Add instruction veord to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Merge into master. 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 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 // cccc11101D00nnnndddd101sN0M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn, 2181 // cccc11101D00nnnndddd101sN0M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn,
2182 // and Mmmmm=Rm. 2182 // and Mmmmm=Rm.
2183 constexpr const char *Vdivd = "vdivd"; 2183 constexpr const char *Vdivd = "vdivd";
2184 IValueT Dd = encodeDRegister(OpDd, "Dd", Vdivd); 2184 IValueT Dd = encodeDRegister(OpDd, "Dd", Vdivd);
2185 IValueT Dn = encodeDRegister(OpDn, "Dn", Vdivd); 2185 IValueT Dn = encodeDRegister(OpDn, "Dn", Vdivd);
2186 IValueT Dm = encodeDRegister(OpDm, "Dm", Vdivd); 2186 IValueT Dm = encodeDRegister(OpDm, "Dm", Vdivd);
2187 constexpr IValueT VdivdOpcode = B23; 2187 constexpr IValueT VdivdOpcode = B23;
2188 emitVFPddd(Cond, VdivdOpcode, Dd, Dn, Dm); 2188 emitVFPddd(Cond, VdivdOpcode, Dd, Dn, Dm);
2189 } 2189 }
2190 2190
2191 void AssemblerARM32::veord(const Operand *OpDd, const Operand *OpDn,
2192 const Operand *OpDm) {
2193 // VEOR - ARM secdtion A8.8.315, encoding A1:
2194 // veor<c> <Dd>, <Dn>, <Dm>
2195 //
2196 // 111100110D00nnnndddd0001N0M1mmmm where Ddddd=Dd, Nnnnn=Dn, and Mmmmm=Dm.
2197 constexpr const char *Veord = "veord";
2198 IValueT Dd = encodeDRegister(OpDd, "Dd", Veord);
2199 IValueT Dn = encodeDRegister(OpDn, "Dn", Veord);
2200 IValueT Dm = encodeDRegister(OpDm, "Dm", Veord);
2201 AssemblerBuffer::EnsureCapacity ensured(&Buffer);
2202 const IValueT Encoding =
2203 B25 | B24 | B8 | B4 |
2204 (encodeCondition(CondARM32::Cond::kNone) << kConditionShift) |
2205 (getYInRegYXXXX(Dd) << 22) | (getXXXXInRegYXXXX(Dn) << 16) |
2206 (getXXXXInRegYXXXX(Dd) << 12) | (getYInRegYXXXX(Dn) << 7) |
2207 (getYInRegYXXXX(Dm) << 5) | getXXXXInRegYXXXX(Dm);
2208 emitInst(Encoding);
2209 }
2210
2191 void AssemblerARM32::vldrd(const Operand *OpDd, const Operand *OpAddress, 2211 void AssemblerARM32::vldrd(const Operand *OpDd, const Operand *OpAddress,
2192 CondARM32::Cond Cond, const TargetInfo &TInfo) { 2212 CondARM32::Cond Cond, const TargetInfo &TInfo) {
2193 // VLDR - ARM section A8.8.333, encoding A1. 2213 // VLDR - ARM section A8.8.333, encoding A1.
2194 // vldr<c> <Dd>, [<Rn>{, #+/-<imm>}] 2214 // vldr<c> <Dd>, [<Rn>{, #+/-<imm>}]
2195 // 2215 //
2196 // cccc1101UD01nnnndddd1011iiiiiiii where cccc=Cond, nnnn=Rn, Ddddd=Rd, 2216 // cccc1101UD01nnnndddd1011iiiiiiii where cccc=Cond, nnnn=Rn, Ddddd=Rd,
2197 // iiiiiiii=abs(Opcode), and U=1 if Opcode>=0, 2217 // iiiiiiii=abs(Opcode), and U=1 if Opcode>=0,
2198 constexpr const char *Vldrd = "vldrd"; 2218 constexpr const char *Vldrd = "vldrd";
2199 IValueT Dd = encodeDRegister(OpDd, "Dd", Vldrd); 2219 IValueT Dd = encodeDRegister(OpDd, "Dd", Vldrd);
2200 assert(CondARM32::isDefined(Cond)); 2220 assert(CondARM32::isDefined(Cond));
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
2375 // 2395 //
2376 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and 2396 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and
2377 // iiiiiiii=NumConsecRegs. 2397 // iiiiiiii=NumConsecRegs.
2378 constexpr IValueT VpushOpcode = 2398 constexpr IValueT VpushOpcode =
2379 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9; 2399 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9;
2380 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs); 2400 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs);
2381 } 2401 }
2382 2402
2383 } // end of namespace ARM32 2403 } // end of namespace ARM32
2384 } // end of namespace Ice 2404 } // 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