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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 } | 63 } |
64 L = Labels[Number]; | 64 L = Labels[Number]; |
65 if (!L) { | 65 if (!L) { |
66 L = new (this->allocate<Label>()) Label(); | 66 L = new (this->allocate<Label>()) Label(); |
67 Labels[Number] = L; | 67 Labels[Number] = L; |
68 } | 68 } |
69 return L; | 69 return L; |
70 } | 70 } |
71 | 71 |
72 template <class Machine> | 72 template <class Machine> |
| 73 Ice::Label *AssemblerX86Base<Machine>::getCfgNodeLabel(SizeT NodeNumber) { |
| 74 assert(NodeNumber < CfgNodeLabels.size()); |
| 75 return CfgNodeLabels[NodeNumber]; |
| 76 } |
| 77 |
| 78 template <class Machine> |
73 Label *AssemblerX86Base<Machine>::getOrCreateCfgNodeLabel(SizeT NodeNumber) { | 79 Label *AssemblerX86Base<Machine>::getOrCreateCfgNodeLabel(SizeT NodeNumber) { |
74 return getOrCreateLabel(NodeNumber, CfgNodeLabels); | 80 return getOrCreateLabel(NodeNumber, CfgNodeLabels); |
75 } | 81 } |
76 | 82 |
77 template <class Machine> | 83 template <class Machine> |
78 Label *AssemblerX86Base<Machine>::getOrCreateLocalLabel(SizeT Number) { | 84 Label *AssemblerX86Base<Machine>::getOrCreateLocalLabel(SizeT Number) { |
79 return getOrCreateLabel(Number, LocalLabels); | 85 return getOrCreateLabel(Number, LocalLabels); |
80 } | 86 } |
81 | 87 |
82 template <class Machine> | 88 template <class Machine> |
(...skipping 3193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3276 (void)shifter; | 3282 (void)shifter; |
3277 if (Ty == IceType_i16) | 3283 if (Ty == IceType_i16) |
3278 emitOperandSizeOverride(); | 3284 emitOperandSizeOverride(); |
3279 emitRexB(Ty, operand.rm()); | 3285 emitRexB(Ty, operand.rm()); |
3280 emitUint8(isByteSizedArithType(Ty) ? 0xD2 : 0xD3); | 3286 emitUint8(isByteSizedArithType(Ty) ? 0xD2 : 0xD3); |
3281 emitOperand(rm, operand); | 3287 emitOperand(rm, operand); |
3282 } | 3288 } |
3283 | 3289 |
3284 } // end of namespace X86Internal | 3290 } // end of namespace X86Internal |
3285 } // end of namespace Ice | 3291 } // end of namespace Ice |
OLD | NEW |