[PATCH 2/3] Add AMDGPU generic targets
Jan Beulich
jbeulich@suse.com
Fri Nov 7 13:37:06 GMT 2025
On 31.10.2025 18:54, Luis Machado wrote:
> --- a/bfd/archures.c
> +++ b/bfd/archures.c
> @@ -560,19 +560,24 @@ DESCRIPTION
> .#define bfd_mach_loongarch64 2
> . bfd_arch_amdgcn, {* AMDGCN *}
> .#define bfd_mach_amdgcn_unknown 0x000
> +.#define bfd_mach_amdgcn_gfx9_generic 0x051
> .#define bfd_mach_amdgcn_gfx900 0x02c
> .#define bfd_mach_amdgcn_gfx904 0x02e
> .#define bfd_mach_amdgcn_gfx906 0x02f
> .#define bfd_mach_amdgcn_gfx908 0x030
> .#define bfd_mach_amdgcn_gfx90a 0x03f
> +.#define bfd_mach_amdgcn_gfx9_4_generic 0x05f
> .#define bfd_mach_amdgcn_gfx942 0x04c
> .#define bfd_mach_amdgcn_gfx950 0x04f
> +.#define bfd_mach_amdgcn_gfx10_1_generic 0x052
> .#define bfd_mach_amdgcn_gfx1010 0x033
> .#define bfd_mach_amdgcn_gfx1011 0x034
> .#define bfd_mach_amdgcn_gfx1012 0x035
> +.#define bfd_mach_amdgcn_gfx10_3_generic 0x053
> .#define bfd_mach_amdgcn_gfx1030 0x036
> .#define bfd_mach_amdgcn_gfx1031 0x037
> .#define bfd_mach_amdgcn_gfx1032 0x038
> +.#define bfd_mach_amdgcn_gfx11_generic 0x054
> .#define bfd_mach_amdgcn_gfx1100 0x041
> .#define bfd_mach_amdgcn_gfx1101 0x046
> .#define bfd_mach_amdgcn_gfx1102 0x047
> @@ -580,6 +585,7 @@ DESCRIPTION
> .#define bfd_mach_amdgcn_gfx1151 0x04a
> .#define bfd_mach_amdgcn_gfx1152 0x055
> .#define bfd_mach_amdgcn_gfx1153 0x058
> +.#define bfd_mach_amdgcn_gfx12_generic 0x059
> .#define bfd_mach_amdgcn_gfx1200 0x048
> .#define bfd_mach_amdgcn_gfx1201 0x04e
Here I'm getting curious: Where are these numbers coming from? I'm asking in
particular in order to understand whether there's a risk of future collisions.
I further wonder by what criteria _generic entries are added (or not).
> --- a/include/elf/amdgpu.h
> +++ b/include/elf/amdgpu.h
> @@ -79,6 +79,12 @@
> #define EF_AMDGPU_MACH_AMDGCN_GFX942 0x04c
> #define EF_AMDGPU_MACH_AMDGCN_GFX1201 0x04e
> #define EF_AMDGPU_MACH_AMDGCN_GFX950 0x04f
> +#define EF_AMDGPU_MACH_AMDGCN_GFX9_GENERIC 0x051
> +#define EF_AMDGPU_MACH_AMDGCN_GFX10_1_GENERIC 0x052
> +#define EF_AMDGPU_MACH_AMDGCN_GFX10_3_GENERIC 0x053
> +#define EF_AMDGPU_MACH_AMDGCN_GFX11_GENERIC 0x054
> +#define EF_AMDGPU_MACH_AMDGCN_GFX12_GENERIC 0x059
> +#define EF_AMDGPU_MACH_AMDGCN_GFX9_4_GENERIC 0x05f
Why is it that these constants aren't used in bfd/archures.c?
Jan
More information about the Binutils
mailing list