llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc
Hafiz Abid Qadeer b205f2bb89 [AMDGPU] Handle s_branch to another section.
Currently, if target of s_branch instruction is in another section, it will fail with the error of undefined label.  Although in this case, the label is not undefined but present in another section. This patch tries to handle this issue. So while handling fixup_si_sopp_br fixup in getRelocType, if the target label is undefined we issue an error as before. If it is defined, a new relocation type R_AMDGPU_REL16 is returned.

This issue has been reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100181 and https://bugs.llvm.org/show_bug.cgi?id=45887. Before https://reviews.llvm.org/D79943, we used to get an crash for this scenario. The crash is fixed now but the we still get an undefined label error.  Jumps to other section can arise with hold/cold splitting.

A patch to handle the relocation in lld will follow shortly.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D105760
2021-07-13 12:17:47 +01:00
..
AMDGPUAsmBackend.cpp [llvm] Remove redundant return and continue statements (NFC) 2021-01-14 20:30:34 -08:00
AMDGPUELFObjectWriter.cpp [AMDGPU] Handle s_branch to another section. 2021-07-13 12:17:47 +01:00
AMDGPUELFStreamer.cpp [NFC][AMDGPU] Reduce include files dependency. 2021-01-07 22:22:05 +03:00
AMDGPUELFStreamer.h [NFC][AMDGPU] Reduce include files dependency. 2021-01-07 22:22:05 +03:00
AMDGPUFixupKinds.h
AMDGPUInstPrinter.cpp [AMDGPU] Fix 64 bit DPP validation 2021-05-06 08:40:26 -07:00
AMDGPUInstPrinter.h [AMDGPU] Use single cache policy operand 2021-03-15 13:00:59 -07:00
AMDGPUMCAsmInfo.cpp [MCAsmInfo] Support UsesCFIForDebug for targets with no exception handling 2021-05-06 04:53:45 +05:30
AMDGPUMCAsmInfo.h
AMDGPUMCCodeEmitter.cpp
AMDGPUMCCodeEmitter.h [NFC][AMDGPU] Reduce include files dependency. 2021-01-07 22:22:05 +03:00
AMDGPUMCTargetDesc.cpp [NFC][AMDGPU] Reduce include files dependency. 2021-01-07 22:22:05 +03:00
AMDGPUMCTargetDesc.h [NFC][AMDGPU] Split AMDGPUSubtarget.h to R600 and GCN subtargets 2021-01-20 22:22:45 +03:00
AMDGPUTargetStreamer.cpp [AMDGPU] Add gfx1035 target 2021-06-24 14:32:41 -04:00
AMDGPUTargetStreamer.h AMDGPU: Add target id and code object v4 support 2021-03-24 11:54:05 -04:00
CMakeLists.txt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
R600MCCodeEmitter.cpp [NFC][AMDGPU] Reduce include files dependency. 2021-01-07 22:22:05 +03:00
R600MCTargetDesc.cpp
SIMCCodeEmitter.cpp [AMDGPU] Add 224-bit vector types and link 192-bit types to MVTs 2021-06-24 12:41:22 +09:00