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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 break; | 836 break; |
837 } | 837 } |
838 case VariableDeclaration::Initializer::ZeroInitializerKind: | 838 case VariableDeclaration::Initializer::ZeroInitializerKind: |
839 Str << "\t.zero\t" << Init->getNumBytes() << "\n"; | 839 Str << "\t.zero\t" << Init->getNumBytes() << "\n"; |
840 break; | 840 break; |
841 case VariableDeclaration::Initializer::RelocInitializerKind: { | 841 case VariableDeclaration::Initializer::RelocInitializerKind: { |
842 const auto *Reloc = | 842 const auto *Reloc = |
843 llvm::cast<VariableDeclaration::RelocInitializer>(Init.get()); | 843 llvm::cast<VariableDeclaration::RelocInitializer>(Init.get()); |
844 Str << "\t" << getEmit32Directive() << "\t"; | 844 Str << "\t" << getEmit32Directive() << "\t"; |
845 Str << Reloc->getDeclaration()->mangleName(Ctx); | 845 Str << Reloc->getDeclaration()->mangleName(Ctx); |
| 846 if (Reloc->hasFixup()) { |
| 847 // TODO(jpp): this is ARM32 specific. |
| 848 Str << "(GOTOFF)"; |
| 849 } |
846 if (RelocOffsetT Offset = Reloc->getOffset()) { | 850 if (RelocOffsetT Offset = Reloc->getOffset()) { |
847 if (Offset >= 0 || (Offset == INT32_MIN)) | 851 if (Offset >= 0 || (Offset == INT32_MIN)) |
848 Str << " + " << Offset; | 852 Str << " + " << Offset; |
849 else | 853 else |
850 Str << " - " << -Offset; | 854 Str << " - " << -Offset; |
851 } | 855 } |
852 Str << "\n"; | 856 Str << "\n"; |
853 break; | 857 break; |
854 } | 858 } |
855 } | 859 } |
(...skipping 19 matching lines...) Expand all Loading... |
875 case Target_##X: \ | 879 case Target_##X: \ |
876 return ::X::createTargetHeaderLowering(Ctx); | 880 return ::X::createTargetHeaderLowering(Ctx); |
877 #include "llvm/Config/SZTargets.def" | 881 #include "llvm/Config/SZTargets.def" |
878 #undef SUBZERO_TARGET | 882 #undef SUBZERO_TARGET |
879 } | 883 } |
880 } | 884 } |
881 | 885 |
882 TargetHeaderLowering::~TargetHeaderLowering() = default; | 886 TargetHeaderLowering::~TargetHeaderLowering() = default; |
883 | 887 |
884 } // end of namespace Ice | 888 } // end of namespace Ice |
OLD | NEW |