From: Matt Arsenault Date: Mon, 7 Aug 2017 22:00:58 +0000 (+0000) Subject: AMDGPU: Implement getMinimumNopSize X-Git-Tag: android-x86-7.1-r4~12444 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d71b0d40d28a6fb1710768d03071855a5f4d8ab5;p=android-x86%2Fexternal-llvm.git AMDGPU: Implement getMinimumNopSize git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310310 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp b/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp index a50e3eb8d9c..1586914c6c4 100644 --- a/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp +++ b/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp @@ -43,6 +43,8 @@ public: llvm_unreachable("Not implemented"); } bool mayNeedRelaxation(const MCInst &Inst) const override { return false; } + + unsigned getMinimumNopSize() const override; bool writeNopData(uint64_t Count, MCObjectWriter *OW) const override; const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const override; @@ -133,6 +135,10 @@ const MCFixupKindInfo &AMDGPUAsmBackend::getFixupKindInfo( return Infos[Kind - FirstTargetFixupKind]; } +unsigned AMDGPUAsmBackend::getMinimumNopSize() const { + return 4; +} + bool AMDGPUAsmBackend::writeNopData(uint64_t Count, MCObjectWriter *OW) const { // If the count is not 4-byte aligned, we must be writing data into the text // section (otherwise we have unaligned instructions, and thus have far