| OLD | NEW |
| 1 //===- subzero/src/IceAssemblerX86BaseImpl.h - base x86 assembler -*- C++ -*-=// | 1 //===- subzero/src/IceAssemblerX86BaseImpl.h - base x86 assembler -*- C++ -*-=// |
| 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
| 5 // | 5 // |
| 6 // Modified by the Subzero authors. | 6 // Modified by the Subzero authors. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // The Subzero Code Generator | 10 // The Subzero Code Generator |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 typename AssemblerX86Base<TraitsType>::Label * | 56 typename AssemblerX86Base<TraitsType>::Label * |
| 57 AssemblerX86Base<TraitsType>::getOrCreateLabel(SizeT Number, | 57 AssemblerX86Base<TraitsType>::getOrCreateLabel(SizeT Number, |
| 58 LabelVector &Labels) { | 58 LabelVector &Labels) { |
| 59 Label *L = nullptr; | 59 Label *L = nullptr; |
| 60 if (Number == Labels.size()) { | 60 if (Number == Labels.size()) { |
| 61 L = new (this->allocate<Label>()) Label(); | 61 L = new (this->allocate<Label>()) Label(); |
| 62 Labels.push_back(L); | 62 Labels.push_back(L); |
| 63 return L; | 63 return L; |
| 64 } | 64 } |
| 65 if (Number > Labels.size()) { | 65 if (Number > Labels.size()) { |
| 66 Labels.resize(Number + 1); | 66 Utils::reserveAndResize(Labels, Number + 1); |
| 67 } | 67 } |
| 68 L = Labels[Number]; | 68 L = Labels[Number]; |
| 69 if (!L) { | 69 if (!L) { |
| 70 L = new (this->allocate<Label>()) Label(); | 70 L = new (this->allocate<Label>()) Label(); |
| 71 Labels[Number] = L; | 71 Labels[Number] = L; |
| 72 } | 72 } |
| 73 return L; | 73 return L; |
| 74 } | 74 } |
| 75 | 75 |
| 76 template <typename TraitsType> | 76 template <typename TraitsType> |
| (...skipping 3458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3535 (void)shifter; | 3535 (void)shifter; |
| 3536 if (Ty == IceType_i16) | 3536 if (Ty == IceType_i16) |
| 3537 emitOperandSizeOverride(); | 3537 emitOperandSizeOverride(); |
| 3538 emitRexB(Ty, operand.rm()); | 3538 emitRexB(Ty, operand.rm()); |
| 3539 emitUint8(isByteSizedArithType(Ty) ? 0xD2 : 0xD3); | 3539 emitUint8(isByteSizedArithType(Ty) ? 0xD2 : 0xD3); |
| 3540 emitOperand(rm, operand); | 3540 emitOperand(rm, operand); |
| 3541 } | 3541 } |
| 3542 | 3542 |
| 3543 } // end of namespace X86NAMESPACE | 3543 } // end of namespace X86NAMESPACE |
| 3544 } // end of namespace Ice | 3544 } // end of namespace Ice |
| OLD | NEW |