OLD | NEW |
1 //===-- ARMAsmBackend.cpp - ARM Assembler Backend -------------------------===// | 1 //===-- ARMAsmBackend.cpp - ARM Assembler Backend -------------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
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 #include "llvm/Target/TargetAsmBackend.h" | 10 #include "llvm/Target/TargetAsmBackend.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 void ApplyFixup(const MCFixup &Fixup, MCDataFragment &DF, | 84 void ApplyFixup(const MCFixup &Fixup, MCDataFragment &DF, |
85 uint64_t Value) const; | 85 uint64_t Value) const; |
86 | 86 |
87 bool isVirtualSection(const MCSection &Section) const { | 87 bool isVirtualSection(const MCSection &Section) const { |
88 const MCSectionELF &SE = static_cast<const MCSectionELF&>(Section); | 88 const MCSectionELF &SE = static_cast<const MCSectionELF&>(Section); |
89 return SE.getType() == MCSectionELF::SHT_NOBITS; | 89 return SE.getType() == MCSectionELF::SHT_NOBITS; |
90 } | 90 } |
91 | 91 |
92 MCObjectWriter *createObjectWriter(raw_ostream &OS) const { | 92 MCObjectWriter *createObjectWriter(raw_ostream &OS) const { |
93 return new ELFObjectWriter(OS, /*Is64Bit=*/false, | 93 return new ARMELFObjectWriter(OS, /*Is64Bit=*/false, |
94 OSType, ELF::EM_ARM, | 94 OSType, ELF::EM_ARM, |
95 /*IsLittleEndian=*/true, | 95 /*IsLittleEndian=*/true, |
96 /*HasRelocationAddend=*/false); | 96 /*HasRelocationAddend=*/false); |
97 } | 97 } |
98 }; | 98 }; |
99 | 99 |
100 // Fixme: can we raise this to share code between Darwin and ELF? | 100 // Fixme: can we raise this to share code between Darwin and ELF? |
101 void ELFARMAsmBackend::ApplyFixup(const MCFixup &Fixup, MCDataFragment &DF, | 101 void ELFARMAsmBackend::ApplyFixup(const MCFixup &Fixup, MCDataFragment &DF, |
102 uint64_t Value) const { | 102 uint64_t Value) const { |
103 assert(0 && "ELFARMAsmBackend::ApplyFixup() unimplemented"); | 103 assert(0 && "ELFARMAsmBackend::ApplyFixup() unimplemented"); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 case Triple::Darwin: | 185 case Triple::Darwin: |
186 return new DarwinARMAsmBackend(T); | 186 return new DarwinARMAsmBackend(T); |
187 case Triple::MinGW32: | 187 case Triple::MinGW32: |
188 case Triple::Cygwin: | 188 case Triple::Cygwin: |
189 case Triple::Win32: | 189 case Triple::Win32: |
190 assert(0 && "Windows not supported on ARM"); | 190 assert(0 && "Windows not supported on ARM"); |
191 default: | 191 default: |
192 return new ELFARMAsmBackend(T, Triple(TT).getOS()); | 192 return new ELFARMAsmBackend(T, Triple(TT).getOS()); |
193 } | 193 } |
194 } | 194 } |
OLD | NEW |