summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp')
-rw-r--r--llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp b/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp
index d5acbe97493..c0c2106807c 100644
--- a/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp
+++ b/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp
@@ -41,8 +41,8 @@ static unsigned getFixupKindSize(unsigned Kind) {
namespace {
class MBlazeELFObjectWriter : public MCELFObjectTargetWriter {
public:
- MBlazeELFObjectWriter(Triple::OSType OSType)
- : MCELFObjectTargetWriter(/*is64Bit*/ false, OSType, ELF::EM_MBLAZE,
+ MBlazeELFObjectWriter(uint8_t OSABI)
+ : MCELFObjectTargetWriter(/*is64Bit*/ false, OSABI, ELF::EM_MBLAZE,
/*HasRelocationAddend*/ true) {}
};
@@ -123,15 +123,15 @@ bool MBlazeAsmBackend::WriteNopData(uint64_t Count, MCObjectWriter *OW) const {
namespace {
class ELFMBlazeAsmBackend : public MBlazeAsmBackend {
public:
- Triple::OSType OSType;
- ELFMBlazeAsmBackend(const Target &T, Triple::OSType _OSType)
- : MBlazeAsmBackend(T), OSType(_OSType) { }
+ uint8_t OSABI;
+ ELFMBlazeAsmBackend(const Target &T, uint8_t _OSABI)
+ : MBlazeAsmBackend(T), OSABI(_OSABI) { }
void ApplyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize,
uint64_t Value) const;
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
- return createELFObjectWriter(new MBlazeELFObjectWriter(OSType), OS,
+ return createELFObjectWriter(new MBlazeELFObjectWriter(OSABI), OS,
/*IsLittleEndian*/ false);
}
};
@@ -172,5 +172,6 @@ MCAsmBackend *llvm::createMBlazeAsmBackend(const Target &T, StringRef TT) {
if (TheTriple.isOSWindows())
assert(0 && "Windows not supported on MBlaze");
- return new ELFMBlazeAsmBackend(T, TheTriple.getOS());
+ uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TheTriple.getOS());
+ return new ELFMBlazeAsmBackend(T, OSABI);
}
OpenPOWER on IntegriCloud