| 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 30 matching lines...) Expand all Loading... |
| 41 Str << Ctx->mangleName(CR->getName()); | 41 Str << Ctx->mangleName(CR->getName()); |
| 42 } else { | 42 } else { |
| 43 // NOTE: currently only float/doubles are put into constant pools. | 43 // NOTE: currently only float/doubles are put into constant pools. |
| 44 // In the future we may put integers as well. | 44 // In the future we may put integers as well. |
| 45 assert(llvm::isa<ConstantFloat>(C) || llvm::isa<ConstantDouble>(C)); | 45 assert(llvm::isa<ConstantFloat>(C) || llvm::isa<ConstantDouble>(C)); |
| 46 C->emitPoolLabel(Str); | 46 C->emitPoolLabel(Str); |
| 47 } | 47 } |
| 48 return Str.str(); | 48 return Str.str(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void AssemblerFixup::emit(GlobalContext *Ctx, RelocOffsetT BaseOffset) const { | 51 void AssemblerFixup::emit(GlobalContext *Ctx, |
| 52 RelocOffsetT OverrideOffset) const { |
| 52 if (!BuildDefs::dump()) | 53 if (!BuildDefs::dump()) |
| 53 return; | 54 return; |
| 54 Ostream &Str = Ctx->getStrEmit(); | 55 Ostream &Str = Ctx->getStrEmit(); |
| 55 if (isNullSymbol()) | 56 if (isNullSymbol()) |
| 56 Str << "__Sz_AbsoluteZero"; | 57 Str << "__Sz_AbsoluteZero"; |
| 57 else | 58 else |
| 58 Str << symbol(Ctx); | 59 Str << symbol(Ctx); |
| 59 RelocOffsetT Offset = offset() + BaseOffset; | 60 RelocOffsetT Offset = OverrideOffset; |
| 60 if (Offset) | 61 if (Offset) |
| 61 Str << " + " << Offset; | 62 Str << " + " << Offset; |
| 62 } | 63 } |
| 63 | 64 |
| 64 } // end of namespace Ice | 65 } // end of namespace Ice |
| OLD | NEW |