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 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2184 // cccc11100D11nnnndddd101sN0M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn, | 2184 // cccc11100D11nnnndddd101sN0M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn, |
2185 // and Mmmmm=Rm. | 2185 // and Mmmmm=Rm. |
2186 constexpr const char *Vaddd = "vaddd"; | 2186 constexpr const char *Vaddd = "vaddd"; |
2187 constexpr IValueT VadddOpcode = B21 | B20; | 2187 constexpr IValueT VadddOpcode = B21 | B20; |
2188 emitVFPddd(Cond, VadddOpcode, OpDd, OpDn, OpDm, Vaddd); | 2188 emitVFPddd(Cond, VadddOpcode, OpDd, OpDn, OpDm, Vaddd); |
2189 } | 2189 } |
2190 | 2190 |
2191 void AssemblerARM32::vandq(const Operand *OpQd, const Operand *OpQm, | 2191 void AssemblerARM32::vandq(const Operand *OpQd, const Operand *OpQm, |
2192 const Operand *OpQn) { | 2192 const Operand *OpQn) { |
2193 // VAND (register) - ARM section A8.8.287, encoding A1: | 2193 // VAND (register) - ARM section A8.8.287, encoding A1: |
2194 // vand.<dt> <Qd>, <Qn>, <Qm> | 2194 // vand <Qd>, <Qn>, <Qm> |
2195 // | 2195 // |
2196 // 111100100D00nnn0ddd00001N1M1mmm0 where Dddd=OpQd, Nnnn=OpQm, and Mmmm=OpQm. | 2196 // 111100100D00nnn0ddd00001N1M1mmm0 where Dddd=OpQd, Nnnn=OpQm, and Mmmm=OpQm. |
2197 constexpr const char *Vandqi = "vandqi"; | 2197 constexpr const char *Vandq = "vandq"; |
2198 constexpr IValueT VandqiOpcode = B8 | B4; | 2198 constexpr IValueT VandqOpcode = B8 | B4; |
2199 constexpr Type ElmtTy = IceType_i8; | 2199 constexpr Type ElmtTy = IceType_i8; |
2200 emitSIMDqqq(VandqiOpcode, ElmtTy, OpQd, OpQm, OpQn, Vandqi); | 2200 emitSIMDqqq(VandqOpcode, ElmtTy, OpQd, OpQm, OpQn, Vandq); |
2201 } | 2201 } |
2202 | 2202 |
2203 void AssemblerARM32::vcmpd(const Operand *OpDd, const Operand *OpDm, | 2203 void AssemblerARM32::vcmpd(const Operand *OpDd, const Operand *OpDm, |
2204 CondARM32::Cond Cond) { | 2204 CondARM32::Cond Cond) { |
2205 constexpr const char *Vcmpd = "vcmpd"; | 2205 constexpr const char *Vcmpd = "vcmpd"; |
2206 IValueT Dd = encodeDRegister(OpDd, "Dd", Vcmpd); | 2206 IValueT Dd = encodeDRegister(OpDd, "Dd", Vcmpd); |
2207 IValueT Dm = encodeDRegister(OpDm, "Dm", Vcmpd); | 2207 IValueT Dm = encodeDRegister(OpDm, "Dm", Vcmpd); |
2208 constexpr IValueT VcmpdOpcode = B23 | B21 | B20 | B18 | B6; | 2208 constexpr IValueT VcmpdOpcode = B23 | B21 | B20 | B18 | B6; |
2209 constexpr IValueT Dn = 0; | 2209 constexpr IValueT Dn = 0; |
2210 emitVFPddd(Cond, VcmpdOpcode, Dd, Dn, Dm); | 2210 emitVFPddd(Cond, VcmpdOpcode, Dd, Dn, Dm); |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2715 // VMUL (floating-point) - ARM section A8.8.351, encoding A2: | 2715 // VMUL (floating-point) - ARM section A8.8.351, encoding A2: |
2716 // vmul<c>.f64 <Dd>, <Dn>, <Dm> | 2716 // vmul<c>.f64 <Dd>, <Dn>, <Dm> |
2717 // | 2717 // |
2718 // cccc11100D10nnnndddd101sN0M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn, | 2718 // cccc11100D10nnnndddd101sN0M0mmmm where cccc=Cond, s=1, Ddddd=Rd, Nnnnn=Rn, |
2719 // and Mmmmm=Rm. | 2719 // and Mmmmm=Rm. |
2720 constexpr const char *Vmuld = "vmuld"; | 2720 constexpr const char *Vmuld = "vmuld"; |
2721 constexpr IValueT VmuldOpcode = B21; | 2721 constexpr IValueT VmuldOpcode = B21; |
2722 emitVFPddd(Cond, VmuldOpcode, OpDd, OpDn, OpDm, Vmuld); | 2722 emitVFPddd(Cond, VmuldOpcode, OpDd, OpDn, OpDm, Vmuld); |
2723 } | 2723 } |
2724 | 2724 |
2725 void AssemblerARM32::vorrq(const Operand *OpQd, const Operand *OpQm, | |
2726 const Operand *OpQn) { | |
2727 // VORR (register) - ARM section A8.8.360, encoding A1: | |
2728 // vorr <Qd>, <Qn>, <Qm> | |
2729 // | |
2730 // 111100100D10nnn0ddd00001N1M1mmm0 where Dddd=OpQd, Nnnn=OpQm, and Mmmm=OpQm. | |
2731 constexpr const char *Vorrq = "vandq"; | |
Jim Stichnoth
2016/02/02 21:47:13
vorrq
Karl
2016/02/02 21:52:45
Done.
| |
2732 constexpr IValueT VorrqOpcode = B21 | B8 | B4; | |
2733 constexpr Type ElmtTy = IceType_i8; | |
2734 emitSIMDqqq(VorrqOpcode, ElmtTy, OpQd, OpQm, OpQn, Vorrq); | |
2735 } | |
2736 | |
2725 void AssemblerARM32::vstrd(const Operand *OpDd, const Operand *OpAddress, | 2737 void AssemblerARM32::vstrd(const Operand *OpDd, const Operand *OpAddress, |
2726 CondARM32::Cond Cond, const TargetInfo &TInfo) { | 2738 CondARM32::Cond Cond, const TargetInfo &TInfo) { |
2727 // VSTR - ARM section A8.8.413, encoding A1: | 2739 // VSTR - ARM section A8.8.413, encoding A1: |
2728 // vstr<c> <Dd>, [<Rn>{, #+/-<Imm>}] | 2740 // vstr<c> <Dd>, [<Rn>{, #+/-<Imm>}] |
2729 // | 2741 // |
2730 // cccc1101UD00nnnndddd1011iiiiiiii where cccc=Cond, nnnn=Rn, Ddddd=Rd, | 2742 // cccc1101UD00nnnndddd1011iiiiiiii where cccc=Cond, nnnn=Rn, Ddddd=Rd, |
2731 // iiiiiiii=abs(Imm >> 2), and U=1 if Imm>=0. | 2743 // iiiiiiii=abs(Imm >> 2), and U=1 if Imm>=0. |
2732 constexpr const char *Vstrd = "vstrd"; | 2744 constexpr const char *Vstrd = "vstrd"; |
2733 IValueT Dd = encodeDRegister(OpDd, "Dd", Vstrd); | 2745 IValueT Dd = encodeDRegister(OpDd, "Dd", Vstrd); |
2734 assert(CondARM32::isDefined(Cond)); | 2746 assert(CondARM32::isDefined(Cond)); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2881 constexpr const char *Vsqrts = "vsqrts"; | 2893 constexpr const char *Vsqrts = "vsqrts"; |
2882 IValueT Sd = encodeSRegister(OpSd, "Sd", Vsqrts); | 2894 IValueT Sd = encodeSRegister(OpSd, "Sd", Vsqrts); |
2883 IValueT Sm = encodeSRegister(OpSm, "Sm", Vsqrts); | 2895 IValueT Sm = encodeSRegister(OpSm, "Sm", Vsqrts); |
2884 constexpr IValueT VsqrtsOpcode = B23 | B21 | B20 | B16 | B7 | B6; | 2896 constexpr IValueT VsqrtsOpcode = B23 | B21 | B20 | B16 | B7 | B6; |
2885 constexpr IValueT S0 = 0; | 2897 constexpr IValueT S0 = 0; |
2886 emitVFPsss(Cond, VsqrtsOpcode, Sd, S0, Sm); | 2898 emitVFPsss(Cond, VsqrtsOpcode, Sd, S0, Sm); |
2887 } | 2899 } |
2888 | 2900 |
2889 } // end of namespace ARM32 | 2901 } // end of namespace ARM32 |
2890 } // end of namespace Ice | 2902 } // end of namespace Ice |
OLD | NEW |