Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Side by Side Diff: lib/Target/MBlaze/MBlazeAsmBackend.cpp

Issue 4828001: INFORMATIONAL: new ELFObjectWriter patch (Closed) Base URL: https://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Target/ARM/ARMAsmBackend.cpp ('k') | lib/Target/X86/X86AsmBackend.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « lib/Target/ARM/ARMAsmBackend.cpp ('k') | lib/Target/X86/X86AsmBackend.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698