[llvm] [llvm-objdump][AMDGPU] Pass ELF ABIVersion through disassembler (PR #78907)
Emma Pilkington via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 22 11:56:39 PST 2024
================
@@ -2184,8 +2188,7 @@ AMDGPUDisassembler::decodeKernelDescriptorDirective(
KERNEL_CODE_PROPERTY_ENABLE_WAVEFRONT_SIZE32);
}
- // FIXME: We should be looking at the ELF header ABI version for this.
- if (AMDGPU::getDefaultAMDHSACodeObjectVersion() >= AMDGPU::AMDHSA_COV5)
+ if (CodeObjectVersion >= AMDGPU::AMDHSA_COV5)
----------------
epilk wrote:
`ELFABIVERSION_AMDGPU_HSA_V5` is the value encoded in the ELF header, which is 3 for COV5 and 2 for COV4. `AMDHSA_COV5` is the actual version, so it has value 5. `getELFABIVersion()` maps from actual to encoded version, and `getAMDHSACodeObjectVersion()` maps from encoded to actual version. It's unfortunate that there's a difference :/
https://github.com/llvm/llvm-project/pull/78907
More information about the llvm-commits
mailing list