[PATCH] D38386: AMDGPU: Add ELFOSABI_AMDGPU_PAL
Tony Tye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 11:31:51 PDT 2017
t-tye requested changes to this revision.
t-tye added inline comments.
This revision now requires changes to proceed.
================
Comment at: include/llvm/Object/ELFObjectFile.h:1067
case ELF::EM_AMDGPU:
- return (EF.getHeader()->e_ident[ELF::EI_CLASS] == ELF::ELFCLASS64
- && EF.getHeader()->e_ident[ELF::EI_OSABI] == ELF::ELFOSABI_AMDGPU_HSA
- && IsLittleEndian) ?
- Triple::amdgcn : Triple::UnknownArch;
+ return EF.getHeader()->e_ident[ELF::EI_CLASS] == ELF::ELFCLASS64 ?
+ Triple::amdgcn : Triple::UnknownArch;
----------------
Should a TODO be added to suggest adding an e_flags bit to distinguish between the amdgcn and r600 architectures?
================
Comment at: include/llvm/Object/ELFObjectFile.h:1067
case ELF::EM_AMDGPU:
- return (EF.getHeader()->e_ident[ELF::EI_CLASS] == ELF::ELFCLASS64
- && EF.getHeader()->e_ident[ELF::EI_OSABI] == ELF::ELFOSABI_AMDGPU_HSA
- && IsLittleEndian) ?
- Triple::amdgcn : Triple::UnknownArch;
+ return EF.getHeader()->e_ident[ELF::EI_CLASS] == ELF::ELFCLASS64 ?
+ Triple::amdgcn : Triple::UnknownArch;
----------------
t-tye wrote:
> Should a TODO be added to suggest adding an e_flags bit to distinguish between the amdgcn and r600 architectures?
Should this also return Triple::UnknownArch if not IsLittleEndian since that is the only supported byte ordering?
https://reviews.llvm.org/D38386
More information about the llvm-commits
mailing list