| 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 /// \file | 10 /// \file |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 Ostream &Str = Ctx->getStrEmit(); | 51 Ostream &Str = Ctx->getStrEmit(); |
| 52 Str << "\t.long "; | 52 Str << "\t.long "; |
| 53 std::string Symbol; | 53 std::string Symbol; |
| 54 if (isNullSymbol()) { | 54 if (isNullSymbol()) { |
| 55 Str << "__Sz_AbsoluteZero"; | 55 Str << "__Sz_AbsoluteZero"; |
| 56 } else { | 56 } else { |
| 57 Symbol = symbol().toString(); | 57 Symbol = symbol().toString(); |
| 58 Str << Symbol; | 58 Str << Symbol; |
| 59 assert(!ValueIsSymbol); | 59 assert(!ValueIsSymbol); |
| 60 if (const auto *CR = llvm::dyn_cast<ConstantRelocatable>(ConstValue)) { | 60 if (const auto *CR = llvm::dyn_cast<ConstantRelocatable>(ConstValue)) { |
| 61 if (!Asm.fixupIsPCRel(kind()) && | 61 if (!Asm.fixupIsPCRel(kind()) && getFlags().getUseNonsfi() && |
| 62 GlobalContext::getFlags().getUseNonsfi() && | |
| 63 CR->getName().toString() != GlobalOffsetTable) { | 62 CR->getName().toString() != GlobalOffsetTable) { |
| 64 Str << "@GOTOFF"; | 63 Str << "@GOTOFF"; |
| 65 } | 64 } |
| 66 } | 65 } |
| 67 } | 66 } |
| 68 | 67 |
| 69 assert(Asm.load<RelocOffsetT>(position()) == 0); | 68 assert(Asm.load<RelocOffsetT>(position()) == 0); |
| 70 | 69 |
| 71 RelocOffsetT Offset = offset(); | 70 RelocOffsetT Offset = offset(); |
| 72 if (Offset != 0) { | 71 if (Offset != 0) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 90 void AssemblerFixup::emitOffset(Assembler *Asm) const { | 89 void AssemblerFixup::emitOffset(Assembler *Asm) const { |
| 91 Asm->store(position(), offset()); | 90 Asm->store(position(), offset()); |
| 92 } | 91 } |
| 93 | 92 |
| 94 size_t AssemblerTextFixup::emit(GlobalContext *Ctx, const Assembler &) const { | 93 size_t AssemblerTextFixup::emit(GlobalContext *Ctx, const Assembler &) const { |
| 95 Ctx->getStrEmit() << Message << "\n"; | 94 Ctx->getStrEmit() << Message << "\n"; |
| 96 return NumBytes; | 95 return NumBytes; |
| 97 } | 96 } |
| 98 | 97 |
| 99 } // end of namespace Ice | 98 } // end of namespace Ice |
| OLD | NEW |