| 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 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2134 emitMulOp(Cond, UmullOpcode, RdLo, RdHi, Rn, Rm, SetFlags); | 2134 emitMulOp(Cond, UmullOpcode, RdLo, RdHi, Rn, Rm, SetFlags); |
| 2135 } | 2135 } |
| 2136 | 2136 |
| 2137 void AssemblerARM32::uxt(const Operand *OpRd, const Operand *OpSrc0, | 2137 void AssemblerARM32::uxt(const Operand *OpRd, const Operand *OpSrc0, |
| 2138 CondARM32::Cond Cond) { | 2138 CondARM32::Cond Cond) { |
| 2139 constexpr const char *UxtName = "uxt"; | 2139 constexpr const char *UxtName = "uxt"; |
| 2140 constexpr IValueT UxtOpcode = B26 | B25 | B23 | B22 | B21; | 2140 constexpr IValueT UxtOpcode = B26 | B25 | B23 | B22 | B21; |
| 2141 emitSignExtend(Cond, UxtOpcode, OpRd, OpSrc0, UxtName); | 2141 emitSignExtend(Cond, UxtOpcode, OpRd, OpSrc0, UxtName); |
| 2142 } | 2142 } |
| 2143 | 2143 |
| 2144 void AssemblerARM32::vabss(const Operand *OpSd, const Operand *OpSm, |
| 2145 CondARM32::Cond Cond) { |
| 2146 // VABS - ARM section A8.8.280, encoding A2: |
| 2147 // vabs<c>.f32 <Sd>, <Sm> |
| 2148 // |
| 2149 // cccc11101D110000dddd101011M0mmmm where cccc=Cond, ddddD=Sd, and mmmmM=Sm. |
| 2150 constexpr const char *Vabss = "vabss"; |
| 2151 IValueT Sd = encodeSRegister(OpSd, "Sd", Vabss); |
| 2152 IValueT Sm = encodeSRegister(OpSm, "Sm", Vabss); |
| 2153 constexpr IValueT S0 = 0; |
| 2154 constexpr IValueT VabssOpcode = B23 | B21 | B20 | B7 | B6; |
| 2155 emitVFPsss(Cond, VabssOpcode, Sd, S0, Sm); |
| 2156 } |
| 2157 |
| 2158 void AssemblerARM32::vabsd(const Operand *OpDd, const Operand *OpDm, |
| 2159 CondARM32::Cond Cond) { |
| 2160 // VABS - ARM section A8.8.280, encoding A2: |
| 2161 // vabs<c>.f64 <Dd>, <Dm> |
| 2162 // |
| 2163 // cccc11101D110000dddd101111M0mmmm where cccc=Cond, Ddddd=Dd, and Mmmmm=Dm. |
| 2164 constexpr const char *Vabsd = "vabsd"; |
| 2165 IValueT Dd = encodeDRegister(OpDd, "Dd", Vabsd); |
| 2166 IValueT Dm = encodeDRegister(OpDm, "Dm", Vabsd); |
| 2167 constexpr IValueT D0 = 0; |
| 2168 constexpr IValueT VabsdOpcode = B23 | B21 | B20 | B7 | B6; |
| 2169 emitVFPddd(Cond, VabsdOpcode, Dd, D0, Dm); |
| 2170 } |
| 2171 |
| 2144 void AssemblerARM32::vadds(const Operand *OpSd, const Operand *OpSn, | 2172 void AssemblerARM32::vadds(const Operand *OpSd, const Operand *OpSn, |
| 2145 const Operand *OpSm, CondARM32::Cond Cond) { | 2173 const Operand *OpSm, CondARM32::Cond Cond) { |
| 2146 // VADD (floating-point) - ARM section A8.8.283, encoding A2: | 2174 // VADD (floating-point) - ARM section A8.8.283, encoding A2: |
| 2147 // vadd<c>.f32 <Sd>, <Sn>, <Sm> | 2175 // vadd<c>.f32 <Sd>, <Sn>, <Sm> |
| 2148 // | 2176 // |
| 2149 // cccc11100D11nnnndddd101sN0M0mmmm where cccc=Cond, s=0, ddddD=Rd, nnnnN=Rn, | 2177 // cccc11100D11nnnndddd101sN0M0mmmm where cccc=Cond, s=0, ddddD=Rd, nnnnN=Rn, |
| 2150 // and mmmmM=Rm. | 2178 // and mmmmM=Rm. |
| 2151 constexpr const char *Vadds = "vadds"; | 2179 constexpr const char *Vadds = "vadds"; |
| 2152 constexpr IValueT VaddsOpcode = B21 | B20; | 2180 constexpr IValueT VaddsOpcode = B21 | B20; |
| 2153 emitVFPsss(Cond, VaddsOpcode, OpSd, OpSn, OpSm, Vadds); | 2181 emitVFPsss(Cond, VaddsOpcode, OpSd, OpSn, OpSm, Vadds); |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2869 constexpr const char *Vsqrts = "vsqrts"; | 2897 constexpr const char *Vsqrts = "vsqrts"; |
| 2870 IValueT Sd = encodeSRegister(OpSd, "Sd", Vsqrts); | 2898 IValueT Sd = encodeSRegister(OpSd, "Sd", Vsqrts); |
| 2871 IValueT Sm = encodeSRegister(OpSm, "Sm", Vsqrts); | 2899 IValueT Sm = encodeSRegister(OpSm, "Sm", Vsqrts); |
| 2872 constexpr IValueT VsqrtsOpcode = B23 | B21 | B20 | B16 | B7 | B6; | 2900 constexpr IValueT VsqrtsOpcode = B23 | B21 | B20 | B16 | B7 | B6; |
| 2873 constexpr IValueT S0 = 0; | 2901 constexpr IValueT S0 = 0; |
| 2874 emitVFPsss(Cond, VsqrtsOpcode, Sd, S0, Sm); | 2902 emitVFPsss(Cond, VsqrtsOpcode, Sd, S0, Sm); |
| 2875 } | 2903 } |
| 2876 | 2904 |
| 2877 } // end of namespace ARM32 | 2905 } // end of namespace ARM32 |
| 2878 } // end of namespace Ice | 2906 } // end of namespace Ice |
| OLD | NEW |