| OLD | NEW |
| 1 //===- subzero/src/IceAssemblerX86Base.h - base x86 assembler -*- C++ -*---===// | 1 //===- subzero/src/IceAssemblerX86Base.h - base x86 assembler -*- 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 UnresolvedNearPositions.pop_back(); | 94 UnresolvedNearPositions.pop_back(); |
| 95 return Pos; | 95 return Pos; |
| 96 } | 96 } |
| 97 | 97 |
| 98 bool hasNear() const { return !UnresolvedNearPositions.empty(); } | 98 bool hasNear() const { return !UnresolvedNearPositions.empty(); } |
| 99 bool isUnused() const override { | 99 bool isUnused() const override { |
| 100 return Ice::Label::isUnused() && !hasNear(); | 100 return Ice::Label::isUnused() && !hasNear(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 private: | 103 private: |
| 104 void nearLinkTo(intptr_t position) { | 104 void nearLinkTo(const Assembler &Asm, intptr_t position) { |
| 105 if (Asm.getPreliminary()) |
| 106 return; |
| 105 assert(!isBound()); | 107 assert(!isBound()); |
| 106 UnresolvedNearPositions.push_back(position); | 108 UnresolvedNearPositions.push_back(position); |
| 107 } | 109 } |
| 108 | 110 |
| 109 llvm::SmallVector<intptr_t, 20> UnresolvedNearPositions; | 111 llvm::SmallVector<intptr_t, 20> UnresolvedNearPositions; |
| 110 | 112 |
| 111 template <class> friend class AssemblerX86Base; | 113 template <class> friend class AssemblerX86Base; |
| 112 }; | 114 }; |
| 113 | 115 |
| 114 template <class Machine> class AssemblerX86Base : public Assembler { | 116 template <class Machine> class AssemblerX86Base : public Assembler { |
| (...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 emitUint8(0x66); | 1068 emitUint8(0x66); |
| 1067 } | 1069 } |
| 1068 | 1070 |
| 1069 } // end of namespace X86Internal | 1071 } // end of namespace X86Internal |
| 1070 | 1072 |
| 1071 } // end of namespace Ice | 1073 } // end of namespace Ice |
| 1072 | 1074 |
| 1073 #include "IceAssemblerX86BaseImpl.h" | 1075 #include "IceAssemblerX86BaseImpl.h" |
| 1074 | 1076 |
| 1075 #endif // SUBZERO_SRC_ICEASSEMBLERX86BASE_H | 1077 #endif // SUBZERO_SRC_ICEASSEMBLERX86BASE_H |
| OLD | NEW |