return true;
}
-/* CDNA2 devices have twice as many VGPRs compared to older devices,
- but the AVGPRS are allocated from the same pool. */
-
-static int
-isa_has_combined_avgprs (int isa)
-{
- switch (isa)
- {
- case EF_AMDGPU_MACH_AMDGCN_GFX803:
- case EF_AMDGPU_MACH_AMDGCN_GFX900:
- case EF_AMDGPU_MACH_AMDGCN_GFX906:
- case EF_AMDGPU_MACH_AMDGCN_GFX908:
- case EF_AMDGPU_MACH_AMDGCN_GFX1030:
- return false;
- case EF_AMDGPU_MACH_AMDGCN_GFX90a:
- return true;
- }
- fatal_error (input_location, "unhandled ISA in isa_has_combined_avgprs");
-}
-
/* Parse an input assembler file, extract the offload tables etc.,
and output (1) the assembler code, minus the tables (which can contain
problematic relocations), and (2) a C file with the offload tables
{
int sgpr_count;
int vgpr_count;
- int avgpr_count;
char *kernel_name;
} regcount = { -1, -1, NULL };
gcc_assert (regcount.kernel_name);
break;
}
- else if (sscanf (buf, " .agpr_count: %d\n",
- ®count.avgpr_count) == 1)
- {
- gcc_assert (regcount.kernel_name);
- break;
- }
break;
}
{
sgpr_count = regcounts[j].sgpr_count;
vgpr_count = regcounts[j].vgpr_count;
- if (isa_has_combined_avgprs (elf_arch))
- vgpr_count += regcounts[j].avgpr_count;
break;
}