| OLD | NEW |
| 1 //===-- MBlazeAsmBackend.cpp - MBlaze Assembler Backend -------------------===// | 1 //===-- MBlazeAsmBackend.cpp - MBlaze 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 void ApplyFixup(const MCFixup &Fixup, MCDataFragment &DF, | 98 void ApplyFixup(const MCFixup &Fixup, MCDataFragment &DF, |
| 99 uint64_t Value) const; | 99 uint64_t Value) const; |
| 100 | 100 |
| 101 bool isVirtualSection(const MCSection &Section) const { | 101 bool isVirtualSection(const MCSection &Section) const { |
| 102 const MCSectionELF &SE = static_cast<const MCSectionELF&>(Section); | 102 const MCSectionELF &SE = static_cast<const MCSectionELF&>(Section); |
| 103 return SE.getType() == MCSectionELF::SHT_NOBITS; | 103 return SE.getType() == MCSectionELF::SHT_NOBITS; |
| 104 } | 104 } |
| 105 | 105 |
| 106 MCObjectWriter *createObjectWriter(raw_ostream &OS) const { | 106 MCObjectWriter *createObjectWriter(raw_ostream &OS) const { |
| 107 return new ELFObjectWriter(OS, /*Is64Bit=*/false, | 107 return new X86ELFObjectWriter(OS, /*Is64Bit=*/false, |
| 108 OSType, ELF::EM_MBLAZE, | 108 OSType, ELF::EM_MBLAZE, |
| 109 /*IsLittleEndian=*/false, | 109 /*IsLittleEndian=*/false, |
| 110 /*HasRelocationAddend=*/true); | 110 /*HasRelocationAddend=*/true); |
| 111 } | 111 } |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 void ELFMBlazeAsmBackend::ApplyFixup(const MCFixup &Fixup, MCDataFragment &DF, | 114 void ELFMBlazeAsmBackend::ApplyFixup(const MCFixup &Fixup, MCDataFragment &DF, |
| 115 uint64_t Value) const { | 115 uint64_t Value) const { |
| 116 unsigned Size = getFixupKindSize(Fixup.getKind()); | 116 unsigned Size = getFixupKindSize(Fixup.getKind()); |
| 117 | 117 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 144 case Triple::Darwin: | 144 case Triple::Darwin: |
| 145 assert(0 && "Mac not supported on MBlaze"); | 145 assert(0 && "Mac not supported on MBlaze"); |
| 146 case Triple::MinGW32: | 146 case Triple::MinGW32: |
| 147 case Triple::Cygwin: | 147 case Triple::Cygwin: |
| 148 case Triple::Win32: | 148 case Triple::Win32: |
| 149 assert(0 && "Windows not supported on MBlaze"); | 149 assert(0 && "Windows not supported on MBlaze"); |
| 150 default: | 150 default: |
| 151 return new ELFMBlazeAsmBackend(T, Triple(TT).getOS()); | 151 return new ELFMBlazeAsmBackend(T, Triple(TT).getOS()); |
| 152 } | 152 } |
| 153 } | 153 } |
| OLD | NEW |