================
@@ -362,6 +362,29 @@ static uint32_t loongarchVariantFromElfFlags(const 
elf::ELFHeader &header) {
   }
 }
 
+static uint32_t AMDGPUVariantFromElfFlags(const elf::ELFHeader &header) {
+  // The flags contain the exact GPU model for HSA only. The sub type is set to
+  // a valid EF_AMDGPU_MACH_ define from the ELF.h file in llvm.
+  if (header.e_ident[EI_OSABI] == ELFOSABI_AMDGPU_HSA) {
+    switch (header.e_ident[EI_ABIVERSION]) {
+    case ELFABIVERSION_AMDGPU_HSA_V2:
+      // Flags bits not parsed for this include:
+      //  EF_AMDGPU_FEATURE_XNACK_V2
+      //  EF_AMDGPU_FEATURE_TRAP_HANDLER_V2
+      break; // No CPU model is defined in HSA V2
----------------
DavidSpickett wrote:

Comments above the line they refer to please.

https://github.com/llvm/llvm-project/pull/206369
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to