| OLD | NEW |
| 1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===// | 1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===// |
| 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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 break; | 824 break; |
| 825 } | 825 } |
| 826 case VariableDeclaration::Initializer::ZeroInitializerKind: | 826 case VariableDeclaration::Initializer::ZeroInitializerKind: |
| 827 Str << "\t.zero\t" << Init->getNumBytes() << "\n"; | 827 Str << "\t.zero\t" << Init->getNumBytes() << "\n"; |
| 828 break; | 828 break; |
| 829 case VariableDeclaration::Initializer::RelocInitializerKind: { | 829 case VariableDeclaration::Initializer::RelocInitializerKind: { |
| 830 const auto *Reloc = | 830 const auto *Reloc = |
| 831 llvm::cast<VariableDeclaration::RelocInitializer>(Init.get()); | 831 llvm::cast<VariableDeclaration::RelocInitializer>(Init.get()); |
| 832 Str << "\t" << getEmit32Directive() << "\t"; | 832 Str << "\t" << getEmit32Directive() << "\t"; |
| 833 Str << Reloc->getDeclaration()->mangleName(Ctx); | 833 Str << Reloc->getDeclaration()->mangleName(Ctx); |
| 834 if (Reloc->hasFixup()) { |
| 835 // TODO(jpp): this is ARM32 specific. |
| 836 Str << "(GOTOFF)"; |
| 837 } |
| 834 if (RelocOffsetT Offset = Reloc->getOffset()) { | 838 if (RelocOffsetT Offset = Reloc->getOffset()) { |
| 835 if (Offset >= 0 || (Offset == INT32_MIN)) | 839 if (Offset >= 0 || (Offset == INT32_MIN)) |
| 836 Str << " + " << Offset; | 840 Str << " + " << Offset; |
| 837 else | 841 else |
| 838 Str << " - " << -Offset; | 842 Str << " - " << -Offset; |
| 839 } | 843 } |
| 840 Str << "\n"; | 844 Str << "\n"; |
| 841 break; | 845 break; |
| 842 } | 846 } |
| 843 } | 847 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 863 case Target_##X: \ | 867 case Target_##X: \ |
| 864 return ::X::createTargetHeaderLowering(Ctx); | 868 return ::X::createTargetHeaderLowering(Ctx); |
| 865 #include "llvm/Config/SZTargets.def" | 869 #include "llvm/Config/SZTargets.def" |
| 866 #undef SUBZERO_TARGET | 870 #undef SUBZERO_TARGET |
| 867 } | 871 } |
| 868 } | 872 } |
| 869 | 873 |
| 870 TargetHeaderLowering::~TargetHeaderLowering() = default; | 874 TargetHeaderLowering::~TargetHeaderLowering() = default; |
| 871 | 875 |
| 872 } // end of namespace Ice | 876 } // end of namespace Ice |
| OLD | NEW |