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 2726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2737 // VPUSH - ARM section A8.8.368, encoding A2: | 2737 // VPUSH - ARM section A8.8.368, encoding A2: |
2738 // vpush<c> <RegList> | 2738 // vpush<c> <RegList> |
2739 // | 2739 // |
2740 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and | 2740 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and |
2741 // iiiiiiii=NumConsecRegs. | 2741 // iiiiiiii=NumConsecRegs. |
2742 constexpr IValueT VpushOpcode = | 2742 constexpr IValueT VpushOpcode = |
2743 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9; | 2743 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9; |
2744 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs); | 2744 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs); |
2745 } | 2745 } |
2746 | 2746 |
| 2747 void AssemblerARM32::vsqrtd(const Operand *OpDd, const Operand *OpDm, |
| 2748 CondARM32::Cond Cond) { |
| 2749 // VSQRT - ARM section A8.8.401, encoding A1: |
| 2750 // vsqrt<c>.f64 <Dd>, <Dm> |
| 2751 // |
| 2752 // cccc11101D110001dddd101111M0mmmm where cccc=Cond, Ddddd=Sd, and Mmmmm=Sm. |
| 2753 constexpr const char *Vsqrtd = "vsqrtd"; |
| 2754 IValueT Dd = encodeDRegister(OpDd, "Dd", Vsqrtd); |
| 2755 IValueT Dm = encodeDRegister(OpDm, "Dm", Vsqrtd); |
| 2756 constexpr IValueT VsqrtdOpcode = B23 | B21 | B20 | B16 | B7 | B6; |
| 2757 constexpr IValueT D0 = 0; |
| 2758 emitVFPddd(Cond, VsqrtdOpcode, Dd, D0, Dm); |
| 2759 } |
| 2760 |
| 2761 void AssemblerARM32::vsqrts(const Operand *OpSd, const Operand *OpSm, |
| 2762 CondARM32::Cond Cond) { |
| 2763 // VSQRT - ARM section A8.8.401, encoding A1: |
| 2764 // vsqrt<c>.f32 <Sd>, <Sm> |
| 2765 // |
| 2766 // cccc11101D110001dddd101011M0mmmm where cccc=Cond, ddddD=Sd, and mmmmM=Sm. |
| 2767 constexpr const char *Vsqrts = "vsqrts"; |
| 2768 IValueT Sd = encodeSRegister(OpSd, "Sd", Vsqrts); |
| 2769 IValueT Sm = encodeSRegister(OpSm, "Sm", Vsqrts); |
| 2770 constexpr IValueT VsqrtsOpcode = B23 | B21 | B20 | B16 | B7 | B6; |
| 2771 constexpr IValueT S0 = 0; |
| 2772 emitVFPsss(Cond, VsqrtsOpcode, Sd, S0, Sm); |
| 2773 } |
| 2774 |
2747 } // end of namespace ARM32 | 2775 } // end of namespace ARM32 |
2748 } // end of namespace Ice | 2776 } // end of namespace Ice |
OLD | NEW |