@@ -1693,6 +1693,19 @@ const EnumEntry<unsigned> ElfHeaderAMDGPUFlagsABIVersion4[] = {
1693
1693
LLVM_READOBJ_ENUM_ENT (ELF, EF_AMDGPU_FEATURE_SRAMECC_ON_V4),
1694
1694
};
1695
1695
1696
+ const EnumEntry<unsigned > ElfHeaderNVPTXFlags[] = {
1697
+ ENUM_ENT (EF_CUDA_SM20, " sm_20" ), ENUM_ENT (EF_CUDA_SM21, " sm_21" ),
1698
+ ENUM_ENT (EF_CUDA_SM30, " sm_30" ), ENUM_ENT (EF_CUDA_SM32, " sm_32" ),
1699
+ ENUM_ENT (EF_CUDA_SM35, " sm_35" ), ENUM_ENT (EF_CUDA_SM37, " sm_37" ),
1700
+ ENUM_ENT (EF_CUDA_SM50, " sm_50" ), ENUM_ENT (EF_CUDA_SM52, " sm_52" ),
1701
+ ENUM_ENT (EF_CUDA_SM53, " sm_53" ), ENUM_ENT (EF_CUDA_SM60, " sm_60" ),
1702
+ ENUM_ENT (EF_CUDA_SM61, " sm_61" ), ENUM_ENT (EF_CUDA_SM62, " sm_62" ),
1703
+ ENUM_ENT (EF_CUDA_SM70, " sm_70" ), ENUM_ENT (EF_CUDA_SM72, " sm_72" ),
1704
+ ENUM_ENT (EF_CUDA_SM75, " sm_75" ), ENUM_ENT (EF_CUDA_SM80, " sm_80" ),
1705
+ ENUM_ENT (EF_CUDA_SM86, " sm_86" ), ENUM_ENT (EF_CUDA_SM87, " sm_87" ),
1706
+ ENUM_ENT (EF_CUDA_SM89, " sm_89" ), ENUM_ENT (EF_CUDA_SM90, " sm_90" ),
1707
+ };
1708
+
1696
1709
const EnumEntry<unsigned > ElfHeaderRISCVFlags[] = {
1697
1710
ENUM_ENT (EF_RISCV_RVC, " RVC" ),
1698
1711
ENUM_ENT (EF_RISCV_FLOAT_ABI_SINGLE, " single-float ABI" ),
@@ -3630,6 +3643,9 @@ template <class ELFT> void GNUELFDumper<ELFT>::printFileHeaders() {
3630
3643
else if (e.e_machine == EM_XTENSA)
3631
3644
ElfFlags = printFlags (e.e_flags , ArrayRef (ElfHeaderXtensaFlags),
3632
3645
unsigned (ELF::EF_XTENSA_MACH));
3646
+ else if (e.e_machine == EM_CUDA)
3647
+ ElfFlags = printFlags (e.e_flags , ArrayRef (ElfHeaderNVPTXFlags),
3648
+ unsigned (ELF::EF_CUDA_SM));
3633
3649
Str = " 0x" + utohexstr (e.e_flags );
3634
3650
if (!ElfFlags.empty ())
3635
3651
Str = Str + " , " + ElfFlags;
@@ -6912,6 +6928,9 @@ template <class ELFT> void LLVMELFDumper<ELFT>::printFileHeaders() {
6912
6928
else if (E.e_machine == EM_XTENSA)
6913
6929
W.printFlags (" Flags" , E.e_flags , ArrayRef (ElfHeaderXtensaFlags),
6914
6930
unsigned (ELF::EF_XTENSA_MACH));
6931
+ else if (E.e_machine == EM_CUDA)
6932
+ W.printFlags (" Flags" , E.e_flags , ArrayRef (ElfHeaderNVPTXFlags),
6933
+ unsigned (ELF::EF_CUDA_SM));
6915
6934
else
6916
6935
W.printFlags (" Flags" , E.e_flags );
6917
6936
W.printNumber (" HeaderSize" , E.e_ehsize );
0 commit comments