| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 case OperandARM32::LSL: | 148 case OperandARM32::LSL: |
| 149 return 0; // 0b00 | 149 return 0; // 0b00 |
| 150 case OperandARM32::LSR: | 150 case OperandARM32::LSR: |
| 151 return 1; // 0b01 | 151 return 1; // 0b01 |
| 152 case OperandARM32::ASR: | 152 case OperandARM32::ASR: |
| 153 return 2; // 0b10 | 153 return 2; // 0b10 |
| 154 case OperandARM32::ROR: | 154 case OperandARM32::ROR: |
| 155 case OperandARM32::RRX: | 155 case OperandARM32::RRX: |
| 156 return 3; // 0b11 | 156 return 3; // 0b11 |
| 157 } | 157 } |
| 158 |
| 159 llvm::report_fatal_error("Unknown Shift value"); |
| 160 return 0; |
| 158 } | 161 } |
| 159 | 162 |
| 160 // Returns the bits in the corresponding masked value. | 163 // Returns the bits in the corresponding masked value. |
| 161 inline IValueT mask(IValueT Value, IValueT Shift, IValueT Bits) { | 164 inline IValueT mask(IValueT Value, IValueT Shift, IValueT Bits) { |
| 162 return (Value >> Shift) & ((1 << Bits) - 1); | 165 return (Value >> Shift) & ((1 << Bits) - 1); |
| 163 } | 166 } |
| 164 | 167 |
| 165 // Extract out a Bit in Value. | 168 // Extract out a Bit in Value. |
| 166 inline bool isBitSet(IValueT Bit, IValueT Value) { | 169 inline bool isBitSet(IValueT Bit, IValueT Value) { |
| 167 return (Value & Bit) == Bit; | 170 return (Value & Bit) == Bit; |
| (...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 // rr defined (RotationValue) rotate. | 1185 // rr defined (RotationValue) rotate. |
| 1183 constexpr IValueT Opcode = B26 | B25 | B23 | B22 | B21 | B20; | 1186 constexpr IValueT Opcode = B26 | B25 | B23 | B22 | B21 | B20; |
| 1184 emitUxt(Cond, Opcode, Rd, Rn, Rm, Rotation); | 1187 emitUxt(Cond, Opcode, Rd, Rn, Rm, Rotation); |
| 1185 return; | 1188 return; |
| 1186 } | 1189 } |
| 1187 } | 1190 } |
| 1188 } | 1191 } |
| 1189 | 1192 |
| 1190 } // end of namespace ARM32 | 1193 } // end of namespace ARM32 |
| 1191 } // end of namespace Ice | 1194 } // end of namespace Ice |
| OLD | NEW |