Chromium Code Reviews| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 380 switch (AddressEncoding) { | 380 switch (AddressEncoding) { |
| 381 case DefaultOpEncoding: | 381 case DefaultOpEncoding: |
| 382 return encodeImmRegOffset(Reg, Offset, Mode); | 382 return encodeImmRegOffset(Reg, Offset, Mode); |
| 383 case OpEncoding3: | 383 case OpEncoding3: |
| 384 return encodeImmRegOffsetEnc3(Reg, Offset, Mode); | 384 return encodeImmRegOffsetEnc3(Reg, Offset, Mode); |
| 385 case OpEncodingMemEx: | 385 case OpEncodingMemEx: |
| 386 assert(Offset == 0); | 386 assert(Offset == 0); |
| 387 assert(Mode == OperandARM32Mem::Offset); | 387 assert(Mode == OperandARM32Mem::Offset); |
| 388 return Reg << kRnShift; | 388 return Reg << kRnShift; |
| 389 } | 389 } |
| 390 llvm_unreachable("(silence g++ warning)"); | |
|
John
2016/01/12 18:09:07
This is surprising to me. g++ can be so annoying a
Jim Stichnoth
2016/01/13 19:30:33
Yep!
I thought to add a default case to the first
| |
| 390 } | 391 } |
| 391 | 392 |
| 392 // Encodes memory address Opnd, and encodes that information into Value, based | 393 // Encodes memory address Opnd, and encodes that information into Value, based |
| 393 // on how ARM represents the address. Returns how the value was encoded. | 394 // on how ARM represents the address. Returns how the value was encoded. |
| 394 EncodedOperand encodeAddress(const Operand *Opnd, IValueT &Value, | 395 EncodedOperand encodeAddress(const Operand *Opnd, IValueT &Value, |
| 395 const AssemblerARM32::TargetInfo &TInfo, | 396 const AssemblerARM32::TargetInfo &TInfo, |
| 396 OpEncoding AddressEncoding = DefaultOpEncoding) { | 397 OpEncoding AddressEncoding = DefaultOpEncoding) { |
| 397 Value = 0; // Make sure initialized. | 398 Value = 0; // Make sure initialized. |
| 398 if (const auto *Var = llvm::dyn_cast<Variable>(Opnd)) { | 399 if (const auto *Var = llvm::dyn_cast<Variable>(Opnd)) { |
| 399 // Should be a stack variable, with an offset. | 400 // Should be a stack variable, with an offset. |
| (...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2288 // | 2289 // |
| 2289 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and | 2290 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and |
| 2290 // iiiiiiii=NumConsecRegs. | 2291 // iiiiiiii=NumConsecRegs. |
| 2291 constexpr IValueT VpushOpcode = | 2292 constexpr IValueT VpushOpcode = |
| 2292 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9; | 2293 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9; |
| 2293 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs); | 2294 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs); |
| 2294 } | 2295 } |
| 2295 | 2296 |
| 2296 } // end of namespace ARM32 | 2297 } // end of namespace ARM32 |
| 2297 } // end of namespace Ice | 2298 } // end of namespace Ice |
| OLD | NEW |