From: Simon Marchi <simon.marchi@efficios.com>
To: binutils@sourceware.org
Cc: Laurent Morichetti <laurent.morichetti@amd.com>,
Lancelot Six <lancelot.six@amd.com>
Subject: Re: [PATCH] bfd, binutils: add gfx11 amdgpu architectures
Date: Wed, 11 Oct 2023 23:03:54 -0400 [thread overview]
Message-ID: <ae09d05d-8a68-4dbb-b222-e8464e445928@efficios.com> (raw)
In-Reply-To: <20230928142256.26768-1-simon.marchi@efficios.com>
Ping.
On 2023-09-28 10:22, Simon Marchi wrote:
> Teach bfd and readelf about some recent gfx11 architectures. This code
> is taken from the rocgdb 5.7.x branch [1].
>
> [1] https://github.com/rocm-Developer-Tools/rocgdb/tree/rocm-5.7.x
>
> bfd/ChangeLog:
>
> * archures.c (bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101,
> bfd_mach_amdgcn_gfx1102): New.
> * bfd-in2.h (bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101,
> bfd_mach_amdgcn_gfx1102): New.
> * cpu-amdgcn.c (arch_info_struct): Add entries for
> bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101,
> bfd_mach_amdgcn_gfx1102.
>
> binutils/ChangeLog:
>
> * readelf.c (decode_AMDGPU_machine_flags): Handle gfx1100,
> gfx1101, gfx1102.
>
> include/ChangeLog:
>
> * elf/amdgpu.h (EF_AMDGPU_MACH_AMDGCN_GFX1100,
> EF_AMDGPU_MACH_AMDGCN_GFX1101,
> EF_AMDGPU_MACH_AMDGCN_GFX1102): New.
>
> Change-Id: I95a8a62942e359781a1c9fa2079950fbcf2a78b8
> Co-Authored-By: Laurent Morichetti <laurent.morichetti@amd.com>
> Cc: Lancelot Six <lancelot.six@amd.com>
> ---
> bfd/archures.c | 3 +++
> bfd/bfd-in2.h | 3 +++
> bfd/cpu-amdgcn.c | 5 ++++-
> binutils/readelf.c | 3 +++
> include/elf/amdgpu.h | 3 +++
> 5 files changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/bfd/archures.c b/bfd/archures.c
> index b59979e60acc..c4455de7c289 100644
> --- a/bfd/archures.c
> +++ b/bfd/archures.c
> @@ -575,6 +575,9 @@ DESCRIPTION
> .#define bfd_mach_amdgcn_gfx1030 0x036
> .#define bfd_mach_amdgcn_gfx1031 0x037
> .#define bfd_mach_amdgcn_gfx1032 0x038
> +.#define bfd_mach_amdgcn_gfx1100 0x041
> +.#define bfd_mach_amdgcn_gfx1101 0x046
> +.#define bfd_mach_amdgcn_gfx1102 0x047
> . bfd_arch_last
> . };
> */
> diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
> index eddb9902f5e4..cf748b48c528 100644
> --- a/bfd/bfd-in2.h
> +++ b/bfd/bfd-in2.h
> @@ -1831,6 +1831,9 @@ enum bfd_architecture
> #define bfd_mach_amdgcn_gfx1030 0x036
> #define bfd_mach_amdgcn_gfx1031 0x037
> #define bfd_mach_amdgcn_gfx1032 0x038
> +#define bfd_mach_amdgcn_gfx1100 0x041
> +#define bfd_mach_amdgcn_gfx1101 0x046
> +#define bfd_mach_amdgcn_gfx1102 0x047
> bfd_arch_last
> };
>
> diff --git a/bfd/cpu-amdgcn.c b/bfd/cpu-amdgcn.c
> index 9d6c26056f3f..d9be7a399d97 100644
> --- a/bfd/cpu-amdgcn.c
> +++ b/bfd/cpu-amdgcn.c
> @@ -52,7 +52,10 @@ static const bfd_arch_info_type arch_info_struct[] =
> N (bfd_mach_amdgcn_gfx1012, "amdgcn:gfx1012", false, NN (7)),
> N (bfd_mach_amdgcn_gfx1030, "amdgcn:gfx1030", false, NN (8)),
> N (bfd_mach_amdgcn_gfx1031, "amdgcn:gfx1031", false, NN (9)),
> - N (bfd_mach_amdgcn_gfx1032, "amdgcn:gfx1032", false, NULL)
> + N (bfd_mach_amdgcn_gfx1032, "amdgcn:gfx1032", false, NN (10)),
> + N (bfd_mach_amdgcn_gfx1100, "amdgcn:gfx1100", false, NN (11)),
> + N (bfd_mach_amdgcn_gfx1101, "amdgcn:gfx1101", false, NN (12)),
> + N (bfd_mach_amdgcn_gfx1102, "amdgcn:gfx1102", false, NULL)
> };
>
> const bfd_arch_info_type bfd_amdgcn_arch =
> diff --git a/binutils/readelf.c b/binutils/readelf.c
> index be2f3851c63a..4fd0a104a526 100644
> --- a/binutils/readelf.c
> +++ b/binutils/readelf.c
> @@ -4533,6 +4533,9 @@ decode_AMDGPU_machine_flags (char *out, unsigned int e_flags, Filedata *filedata
> AMDGPU_CASE (EF_AMDGPU_MACH_AMDGCN_GFX1031, "gfx1031")
> AMDGPU_CASE (EF_AMDGPU_MACH_AMDGCN_GFX1032, "gfx1032")
> AMDGPU_CASE (EF_AMDGPU_MACH_AMDGCN_GFX1033, "gfx1033")
> + AMDGPU_CASE (EF_AMDGPU_MACH_AMDGCN_GFX1100, "gfx1100")
> + AMDGPU_CASE (EF_AMDGPU_MACH_AMDGCN_GFX1101, "gfx1101")
> + AMDGPU_CASE (EF_AMDGPU_MACH_AMDGCN_GFX1102, "gfx1102")
> AMDGPU_CASE (EF_AMDGPU_MACH_AMDGCN_GFX602, "gfx602")
> AMDGPU_CASE (EF_AMDGPU_MACH_AMDGCN_GFX705, "gfx705")
> AMDGPU_CASE (EF_AMDGPU_MACH_AMDGCN_GFX805, "gfx805")
> diff --git a/include/elf/amdgpu.h b/include/elf/amdgpu.h
> index d44244194e9d..15720356ac02 100644
> --- a/include/elf/amdgpu.h
> +++ b/include/elf/amdgpu.h
> @@ -67,8 +67,11 @@
> #define EF_AMDGPU_MACH_AMDGCN_GFX1034 0x03e
> #define EF_AMDGPU_MACH_AMDGCN_GFX90A 0x03f
> #define EF_AMDGPU_MACH_AMDGCN_GFX940 0x040
> +#define EF_AMDGPU_MACH_AMDGCN_GFX1100 0x041
> #define EF_AMDGPU_MACH_AMDGCN_GFX1013 0x042
> #define EF_AMDGPU_MACH_AMDGCN_GFX1036 0x045
> +#define EF_AMDGPU_MACH_AMDGCN_GFX1101 0x046
> +#define EF_AMDGPU_MACH_AMDGCN_GFX1102 0x047
>
> /* Code object v3 machine flags. */
>
>
> base-commit: 054f25955c2b77f6e21073bfdd70a60e9df1ffe7
next prev parent reply other threads:[~2023-10-12 3:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 14:22 Simon Marchi
2023-10-12 3:03 ` Simon Marchi [this message]
2023-11-10 14:22 ` Nick Clifton
2023-11-10 18:20 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae09d05d-8a68-4dbb-b222-e8464e445928@efficios.com \
--to=simon.marchi@efficios.com \
--cc=binutils@sourceware.org \
--cc=lancelot.six@amd.com \
--cc=laurent.morichetti@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).