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

Side by Side Diff: src/IceAssemblerARM32.cpp

Issue 1665593002: Add VMUL vector instructions to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit. Created 4 years, 10 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 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after
2750 // VMUL (floating-point) - ARM section A8.8.351, encoding A2: 2750 // VMUL (floating-point) - ARM section A8.8.351, encoding A2:
2751 // vmul<c>.f64 <Dd>, <Dn>, <Dm> 2751 // vmul<c>.f64 <Dd>, <Dn>, <Dm>
2752 // 2752 //
2753 // cccc11100D10nnnndddd101sN0M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn, 2753 // cccc11100D10nnnndddd101sN0M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn,
2754 // and Mmmmm=Rm. 2754 // and Mmmmm=Rm.
2755 constexpr const char *Vmuld = "vmuld"; 2755 constexpr const char *Vmuld = "vmuld";
2756 constexpr IValueT VmuldOpcode = B21; 2756 constexpr IValueT VmuldOpcode = B21;
2757 emitVFPddd(Cond, VmuldOpcode, OpDd, OpDn, OpDm, Vmuld); 2757 emitVFPddd(Cond, VmuldOpcode, OpDd, OpDn, OpDm, Vmuld);
2758 } 2758 }
2759 2759
2760 void AssemblerARM32::vmulqi(Type ElmtTy, const Operand *OpQd,
2761 const Operand *OpQn, const Operand *OpQm) {
2762 // VMUL, VMULL (integer and polynomial) - ARM section A8.8.350, encoding A1:
2763 // vmul<c>.<dt> <Qd>, <Qn>, <Qm>
2764 //
2765 // 111100100Dssnnn0ddd01001NqM1mmm0 where Dddd=Qd, Nnnn=Qn, Mmmm=Qm, and
2766 // dt in [i8, i16, i32] where ss is the index.
2767 assert(ElmtTy != IceType_i64 && "vmulqi on i64 vector not allowed");
2768 constexpr const char *Vmulqi = "vmulqi";
2769 constexpr IValueT VmulqiOpcode = B11 | B8 | B4;
2770 emitSIMDqqq(VmulqiOpcode, ElmtTy, OpQd, OpQn, OpQm, Vmulqi);
2771 }
2772
2773 void AssemblerARM32::vmulqf(const Operand *OpQd, const Operand *OpQn,
2774 const Operand *OpQm) {
2775 // VMUL (floating-point) - ARM section A8.8.351, encoding A1:
2776 // vmul.f32 <Qd>, <Qn>, <Qm>
2777 //
2778 // 111100110D00nnn0ddd01101MqM1mmm0 where Dddd=Qd, Nnnn=Qn, and Mmmm=Qm.
2779 constexpr const char *Vmulqf = "vmulqf";
2780 constexpr IValueT VmulqfOpcode = B24 | B11 | B10 | B8 | B4;
2781 emitSIMDqqq(VmulqfOpcode, IceType_f32, OpQd, OpQn, OpQm, Vmulqf);
2782 }
2783
2760 void AssemblerARM32::vorrq(const Operand *OpQd, const Operand *OpQm, 2784 void AssemblerARM32::vorrq(const Operand *OpQd, const Operand *OpQm,
2761 const Operand *OpQn) { 2785 const Operand *OpQn) {
2762 // VORR (register) - ARM section A8.8.360, encoding A1: 2786 // VORR (register) - ARM section A8.8.360, encoding A1:
2763 // vorr <Qd>, <Qn>, <Qm> 2787 // vorr <Qd>, <Qn>, <Qm>
2764 // 2788 //
2765 // 111100100D10nnn0ddd00001N1M1mmm0 where Dddd=OpQd, Nnnn=OpQm, and Mmmm=OpQm. 2789 // 111100100D10nnn0ddd00001N1M1mmm0 where Dddd=OpQd, Nnnn=OpQm, and Mmmm=OpQm.
2766 constexpr const char *Vorrq = "vorrq"; 2790 constexpr const char *Vorrq = "vorrq";
2767 constexpr IValueT VorrqOpcode = B21 | B8 | B4; 2791 constexpr IValueT VorrqOpcode = B21 | B8 | B4;
2768 constexpr Type ElmtTy = IceType_i8; 2792 constexpr Type ElmtTy = IceType_i8;
2769 emitSIMDqqq(VorrqOpcode, ElmtTy, OpQd, OpQm, OpQn, Vorrq); 2793 emitSIMDqqq(VorrqOpcode, ElmtTy, OpQd, OpQm, OpQn, Vorrq);
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
2928 constexpr const char *Vsqrts = "vsqrts"; 2952 constexpr const char *Vsqrts = "vsqrts";
2929 IValueT Sd = encodeSRegister(OpSd, "Sd", Vsqrts); 2953 IValueT Sd = encodeSRegister(OpSd, "Sd", Vsqrts);
2930 IValueT Sm = encodeSRegister(OpSm, "Sm", Vsqrts); 2954 IValueT Sm = encodeSRegister(OpSm, "Sm", Vsqrts);
2931 constexpr IValueT VsqrtsOpcode = B23 | B21 | B20 | B16 | B7 | B6; 2955 constexpr IValueT VsqrtsOpcode = B23 | B21 | B20 | B16 | B7 | B6;
2932 constexpr IValueT S0 = 0; 2956 constexpr IValueT S0 = 0;
2933 emitVFPsss(Cond, VsqrtsOpcode, Sd, S0, Sm); 2957 emitVFPsss(Cond, VsqrtsOpcode, Sd, S0, Sm);
2934 } 2958 }
2935 2959
2936 } // end of namespace ARM32 2960 } // end of namespace ARM32
2937 } // end of namespace Ice 2961 } // 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