| OLD | NEW |
| 1 //===- subzero/src/IceFixups.cpp - Implementation of Assembler Fixups -----===// | 1 //===- subzero/src/IceFixups.cpp - Implementation of Assembler Fixups -----===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file implements the AssemblerFixup class, a very basic | 10 // This file implements the AssemblerFixup class, a very basic |
| 11 // target-independent representation of a fixup or relocation. | 11 // target-independent representation of a fixup or relocation. |
| 12 // | 12 // |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 #include "IceFixups.h" | 15 #include "IceFixups.h" |
| 16 |
| 16 #include "IceOperand.h" | 17 #include "IceOperand.h" |
| 17 | 18 |
| 18 namespace Ice { | 19 namespace Ice { |
| 19 | 20 |
| 20 const Constant *AssemblerFixup::NullSymbol = nullptr; | 21 const Constant *AssemblerFixup::NullSymbol = nullptr; |
| 21 | 22 |
| 22 RelocOffsetT AssemblerFixup::offset() const { | 23 RelocOffsetT AssemblerFixup::offset() const { |
| 23 if (isNullSymbol()) | 24 if (isNullSymbol()) |
| 24 return 0; | 25 return 0; |
| 25 if (const auto CR = llvm::dyn_cast<ConstantRelocatable>(value_)) | 26 if (const auto CR = llvm::dyn_cast<ConstantRelocatable>(value_)) |
| (...skipping 27 matching lines...) Expand all Loading... |
| 53 if (isNullSymbol()) | 54 if (isNullSymbol()) |
| 54 Str << "__Sz_AbsoluteZero"; | 55 Str << "__Sz_AbsoluteZero"; |
| 55 else | 56 else |
| 56 Str << symbol(Ctx); | 57 Str << symbol(Ctx); |
| 57 RelocOffsetT Offset = offset() + BaseOffset; | 58 RelocOffsetT Offset = offset() + BaseOffset; |
| 58 if (Offset) | 59 if (Offset) |
| 59 Str << " + " << Offset; | 60 Str << " + " << Offset; |
| 60 } | 61 } |
| 61 | 62 |
| 62 } // end of namespace Ice | 63 } // end of namespace Ice |
| OLD | NEW |