| OLD | NEW |
| 1 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ------*- C++ -*-===// | 1 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ------*- 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 private: | 245 private: |
| 246 Address() {} // Needed by Address::Absolute. | 246 Address() {} // Needed by Address::Absolute. |
| 247 }; | 247 }; |
| 248 | 248 |
| 249 class Label { | 249 class Label { |
| 250 Label(const Label &) = delete; | 250 Label(const Label &) = delete; |
| 251 Label &operator=(const Label &) = delete; | 251 Label &operator=(const Label &) = delete; |
| 252 | 252 |
| 253 public: | 253 public: |
| 254 Label() : position_(0), num_unresolved_(0) { | 254 Label() : position_(0), num_unresolved_(0) { |
| 255 #ifndef NDEBUG | 255 #ifdef NDEBUG |
| 256 return; |
| 257 #endif // !NDEBUG |
| 256 for (int i = 0; i < kMaxUnresolvedBranches; i++) { | 258 for (int i = 0; i < kMaxUnresolvedBranches; i++) { |
| 257 unresolved_near_positions_[i] = -1; | 259 unresolved_near_positions_[i] = -1; |
| 258 } | 260 } |
| 259 #endif // !NDEBUG | |
| 260 } | 261 } |
| 261 | 262 |
| 262 ~Label() {} | 263 ~Label() {} |
| 263 | 264 |
| 264 void FinalCheck() const { | 265 void FinalCheck() const { |
| 265 // Assert if label is being destroyed with unresolved branches pending. | 266 // Assert if label is being destroyed with unresolved branches pending. |
| 266 assert(!IsLinked()); | 267 assert(!IsLinked()); |
| 267 assert(!HasNear()); | 268 assert(!HasNear()); |
| 268 } | 269 } |
| 269 | 270 |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 inline void AssemblerX8632::emitFixup(AssemblerFixup *fixup) { | 916 inline void AssemblerX8632::emitFixup(AssemblerFixup *fixup) { |
| 916 Buffer.emitFixup(fixup); | 917 Buffer.emitFixup(fixup); |
| 917 } | 918 } |
| 918 | 919 |
| 919 inline void AssemblerX8632::emitOperandSizeOverride() { emitUint8(0x66); } | 920 inline void AssemblerX8632::emitOperandSizeOverride() { emitUint8(0x66); } |
| 920 | 921 |
| 921 } // end of namespace X8632 | 922 } // end of namespace X8632 |
| 922 } // end of namespace Ice | 923 } // end of namespace Ice |
| 923 | 924 |
| 924 #endif // SUBZERO_SRC_ICEASSEMBLERX8632_H | 925 #endif // SUBZERO_SRC_ICEASSEMBLERX8632_H |
| OLD | NEW |