| 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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 break; | 857 break; |
| 858 } | 858 } |
| 859 case VariableDeclaration::Initializer::ZeroInitializerKind: | 859 case VariableDeclaration::Initializer::ZeroInitializerKind: |
| 860 Str << "\t.zero\t" << Init->getNumBytes() << "\n"; | 860 Str << "\t.zero\t" << Init->getNumBytes() << "\n"; |
| 861 break; | 861 break; |
| 862 case VariableDeclaration::Initializer::RelocInitializerKind: { | 862 case VariableDeclaration::Initializer::RelocInitializerKind: { |
| 863 const auto *Reloc = | 863 const auto *Reloc = |
| 864 llvm::cast<VariableDeclaration::RelocInitializer>(Init.get()); | 864 llvm::cast<VariableDeclaration::RelocInitializer>(Init.get()); |
| 865 Str << "\t" << getEmit32Directive() << "\t"; | 865 Str << "\t" << getEmit32Directive() << "\t"; |
| 866 Str << Reloc->getDeclaration()->mangleName(Ctx); | 866 Str << Reloc->getDeclaration()->mangleName(Ctx); |
| 867 if (Reloc->hasFixup()) { |
| 868 // TODO(jpp): this is ARM32 specific. |
| 869 Str << "(GOTOFF)"; |
| 870 } |
| 867 if (RelocOffsetT Offset = Reloc->getOffset()) { | 871 if (RelocOffsetT Offset = Reloc->getOffset()) { |
| 868 if (Offset >= 0 || (Offset == INT32_MIN)) | 872 if (Offset >= 0 || (Offset == INT32_MIN)) |
| 869 Str << " + " << Offset; | 873 Str << " + " << Offset; |
| 870 else | 874 else |
| 871 Str << " - " << -Offset; | 875 Str << " - " << -Offset; |
| 872 } | 876 } |
| 873 Str << "\n"; | 877 Str << "\n"; |
| 874 break; | 878 break; |
| 875 } | 879 } |
| 876 } | 880 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 896 case Target_##X: \ | 900 case Target_##X: \ |
| 897 return ::X::createTargetHeaderLowering(Ctx); | 901 return ::X::createTargetHeaderLowering(Ctx); |
| 898 #include "llvm/Config/SZTargets.def" | 902 #include "llvm/Config/SZTargets.def" |
| 899 #undef SUBZERO_TARGET | 903 #undef SUBZERO_TARGET |
| 900 } | 904 } |
| 901 } | 905 } |
| 902 | 906 |
| 903 TargetHeaderLowering::~TargetHeaderLowering() = default; | 907 TargetHeaderLowering::~TargetHeaderLowering() = default; |
| 904 | 908 |
| 905 } // end of namespace Ice | 909 } // end of namespace Ice |
| OLD | NEW |