| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |