| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 case IceType_i8: | 150 case IceType_i8: |
| 151 case IceType_f32: | 151 case IceType_f32: |
| 152 return 0; | 152 return 0; |
| 153 case IceType_i16: | 153 case IceType_i16: |
| 154 return 1; | 154 return 1; |
| 155 case IceType_i32: | 155 case IceType_i32: |
| 156 return 2; | 156 return 2; |
| 157 case IceType_i64: | 157 case IceType_i64: |
| 158 return 3; | 158 return 3; |
| 159 default: | 159 default: |
| 160 llvm::report_fatal_error( | 160 llvm::report_fatal_error("SIMD op: Don't understand element type " + |
| 161 std::string("SIMD op: Don't understand element type ") + | 161 std::string(typeString(ElmtTy))); |
| 162 typeString(ElmtTy)); | |
| 163 } | 162 } |
| 164 } | 163 } |
| 165 | 164 |
| 166 IValueT encodeShift(OperandARM32::ShiftKind Shift) { | 165 IValueT encodeShift(OperandARM32::ShiftKind Shift) { |
| 167 // Follows encoding in ARM section A8.4.1 "Constant shifts". | 166 // Follows encoding in ARM section A8.4.1 "Constant shifts". |
| 168 switch (Shift) { | 167 switch (Shift) { |
| 169 case OperandARM32::kNoShift: | 168 case OperandARM32::kNoShift: |
| 170 case OperandARM32::LSL: | 169 case OperandARM32::LSL: |
| 171 return 0; // 0b00 | 170 return 0; // 0b00 |
| 172 case OperandARM32::LSR: | 171 case OperandARM32::LSR: |
| (...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2847 constexpr const char *Vsqrts = "vsqrts"; | 2846 constexpr const char *Vsqrts = "vsqrts"; |
| 2848 IValueT Sd = encodeSRegister(OpSd, "Sd", Vsqrts); | 2847 IValueT Sd = encodeSRegister(OpSd, "Sd", Vsqrts); |
| 2849 IValueT Sm = encodeSRegister(OpSm, "Sm", Vsqrts); | 2848 IValueT Sm = encodeSRegister(OpSm, "Sm", Vsqrts); |
| 2850 constexpr IValueT VsqrtsOpcode = B23 | B21 | B20 | B16 | B7 | B6; | 2849 constexpr IValueT VsqrtsOpcode = B23 | B21 | B20 | B16 | B7 | B6; |
| 2851 constexpr IValueT S0 = 0; | 2850 constexpr IValueT S0 = 0; |
| 2852 emitVFPsss(Cond, VsqrtsOpcode, Sd, S0, Sm); | 2851 emitVFPsss(Cond, VsqrtsOpcode, Sd, S0, Sm); |
| 2853 } | 2852 } |
| 2854 | 2853 |
| 2855 } // end of namespace ARM32 | 2854 } // end of namespace ARM32 |
| 2856 } // end of namespace Ice | 2855 } // end of namespace Ice |
| OLD | NEW |