diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-30 16:33:32 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-30 16:33:32 +0000 |
| commit | 51315c45ff5643a27f9c84b816db54ee870ba29b (patch) | |
| tree | 1d87443fa0e53d3e6b315ce25787e64be0906bf7 /contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp | |
| parent | 6dfd050075216be8538ae375a22d30db72916f7e (diff) | |
| parent | eb11fae6d08f479c0799db45860a98af528fa6e7 (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp')
| -rw-r--r-- | contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp b/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp index 5cd4a7daf0fa6..2146832f77944 100644 --- a/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp +++ b/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp @@ -44,7 +44,7 @@ class SystemZMCAsmBackend : public MCAsmBackend { uint8_t OSABI; public: SystemZMCAsmBackend(uint8_t osABI) - : OSABI(osABI) {} + : MCAsmBackend(support::big), OSABI(osABI) {} // Override MCAsmBackend unsigned getNumFixupKinds() const override { @@ -53,8 +53,10 @@ public: const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const override; void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup, const MCValue &Target, MutableArrayRef<char> Data, - uint64_t Value, bool IsResolved) const override; - bool mayNeedRelaxation(const MCInst &Inst) const override { + uint64_t Value, bool IsResolved, + const MCSubtargetInfo *STI) const override; + bool mayNeedRelaxation(const MCInst &Inst, + const MCSubtargetInfo &STI) const override { return false; } bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value, @@ -66,10 +68,10 @@ public: MCInst &Res) const override { llvm_unreachable("SystemZ does do not have assembler relaxation"); } - bool writeNopData(uint64_t Count, MCObjectWriter *OW) const override; - std::unique_ptr<MCObjectWriter> - createObjectWriter(raw_pwrite_stream &OS) const override { - return createSystemZObjectWriter(OS, OSABI); + bool writeNopData(raw_ostream &OS, uint64_t Count) const override; + std::unique_ptr<MCObjectTargetWriter> + createObjectTargetWriter() const override { + return createSystemZObjectWriter(OSABI); } }; } // end anonymous namespace @@ -96,7 +98,8 @@ void SystemZMCAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup, const MCValue &Target, MutableArrayRef<char> Data, uint64_t Value, - bool IsResolved) const { + bool IsResolved, + const MCSubtargetInfo *STI) const { MCFixupKind Kind = Fixup.getKind(); unsigned Offset = Fixup.getOffset(); unsigned BitSize = getFixupKindInfo(Kind).TargetSize; @@ -115,10 +118,9 @@ void SystemZMCAsmBackend::applyFixup(const MCAssembler &Asm, } } -bool SystemZMCAsmBackend::writeNopData(uint64_t Count, - MCObjectWriter *OW) const { +bool SystemZMCAsmBackend::writeNopData(raw_ostream &OS, uint64_t Count) const { for (uint64_t I = 0; I != Count; ++I) - OW->write8(7); + OS << '\x7'; return true; } |
