From: Simon Marchi <simon.marchi@polymtl.ca>
To: John Baldwin <jhb@FreeBSD.org>, gdb-patches@sourceware.org
Cc: Willgerodt@smtp.polymtl.ca, Felix <felix.willgerodt@intel.com>,
George@smtp.polymtl.ca, Jini Susan <JiniSusan.George@amd.com>
Subject: Re: [RFC 05/13] nat/x86-cpuid.h: Remove non-x86 fallbacks
Date: Thu, 12 Oct 2023 00:29:58 -0400 [thread overview]
Message-ID: <21a013ea-83d3-49d3-80c6-ca8477e3d60b@polymtl.ca> (raw)
In-Reply-To: <20231009183617.24862-6-jhb@FreeBSD.org>
On 2023-10-09 14:36, John Baldwin wrote:
> This header is only suitable for use on x86 hosts and is only included
> there, so these fallbacks should not be needed.
> ---
> gdb/nat/x86-cpuid.h | 22 ----------------------
> 1 file changed, 22 deletions(-)
>
> diff --git a/gdb/nat/x86-cpuid.h b/gdb/nat/x86-cpuid.h
> index e1b0321d593..9401705c44d 100644
> --- a/gdb/nat/x86-cpuid.h
> +++ b/gdb/nat/x86-cpuid.h
> @@ -28,8 +28,6 @@
> #define nullptr ((void *) 0)
> #endif
>
> -#if defined(__i386__) || defined(__x86_64__)
> -
> /* Return cpuid data for requested cpuid level, as found in returned
> eax, ebx, ecx and edx registers. The function checks if cpuid is
> supported and returns 1 for valid cpuid information or 0 for
> @@ -78,26 +76,6 @@ x86_cpuid_count (unsigned int __level, unsigned int __sublevel,
> return __get_cpuid_count (__level, __sublevel, __eax, __ebx, __ecx, __edx);
> }
>
> -#else
> -
> -static __inline int
> -x86_cpuid (unsigned int __level,
> - unsigned int *__eax, unsigned int *__ebx,
> - unsigned int *__ecx, unsigned int *__edx)
> -{
> - return 0;
> -}
> -
> -static __inline int
> -x86_cpuid_count (unsigned int __level, unsigned int __sublevel,
> - unsigned int *__eax, unsigned int *__ebx,
> - unsigned int *__ecx, unsigned int *__edx)
> -{
> - return 0;
> -}
> -
> -#endif /* i386 && x86_64 */
> -
> #ifndef __cplusplus
> /* Avoid leaking this local definition beyond the scope of this header
> file. */
I think that one could go in right away.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Simon
next prev parent reply other threads:[~2023-10-12 4:30 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 18:36 [RFC 00/13] Proposal for a new NT_X86_CPUID core dump note John Baldwin
2023-10-09 18:36 ` [RFC 01/13] binutils: Support for the " John Baldwin
2023-10-16 9:23 ` Lancelot SIX
2023-10-16 23:23 ` John Baldwin
2023-10-09 18:36 ` [RFC 02/13] i387-tdep: Add function to read XSAVE layout from NT_X86_CPUID John Baldwin
2023-10-12 4:27 ` Simon Marchi
2023-10-16 23:52 ` John Baldwin
2023-10-16 9:17 ` Lancelot SIX
2023-10-17 0:04 ` John Baldwin
2023-10-09 18:36 ` [RFC 03/13] gdb: Use NT_X86_CPUID in x86 FreeBSD architectures to read XSAVE layouts John Baldwin
2023-10-09 18:36 ` [RFC 04/13] " John Baldwin
2023-10-12 4:28 ` Simon Marchi
2023-10-17 0:07 ` John Baldwin
2023-10-09 18:36 ` [RFC 05/13] nat/x86-cpuid.h: Remove non-x86 fallbacks John Baldwin
2023-10-12 4:29 ` Simon Marchi [this message]
2023-10-09 18:36 ` [RFC 06/13] nat/x86-cpuid: Add a function to build the contents of a NT_X86_CPUID note John Baldwin
2023-10-12 4:41 ` Simon Marchi
2023-10-17 0:22 ` John Baldwin
2023-10-09 18:36 ` [RFC 07/13] x86_elf_make_cpuid_note: Helper routine to build NT_X86_CPUID ELF note John Baldwin
2023-10-09 18:36 ` [RFC 08/13] x86-fbsd-nat: Support fetching TARGET_OBJECT_X86_CPUID objects John Baldwin
2023-10-09 18:36 ` [RFC 09/13] fbsd-tdep: Export fbsd_make_corefile_notes John Baldwin
2023-10-09 18:36 ` [RFC 10/13] {amd64,i386}-fbsd-tdep: Include NT_X86_CPUID notes in core dumps from gcore John Baldwin
2023-10-16 9:31 ` [RFC 10/13] {amd64, i386}-fbsd-tdep: " Lancelot SIX
2023-10-17 0:26 ` John Baldwin
2023-10-09 18:36 ` [RFC 11/13] x86-linux-nat: Support fetching TARGET_OBJECT_X86_CPUID objects John Baldwin
2023-10-09 18:36 ` [RFC 12/13] linux-tdep: Export linux_make_corefile_notes John Baldwin
2023-10-09 18:36 ` [RFC 13/13] {amd64,i386}-linux-tdep: Include NT_X86_CPUID notes in core dumps from gcore John Baldwin
2023-10-10 16:30 ` [RFC 00/13] Proposal for a new NT_X86_CPUID core dump note George, Jini Susan
2023-10-12 4:01 ` Simon Marchi
2023-10-12 14:33 ` Simon Marchi
2023-10-12 17:18 ` John Baldwin
2023-10-13 9:38 ` George, Jini Susan
2023-10-17 0:36 ` John Baldwin
2023-10-26 16:18 ` George, Jini Susan
2023-10-27 2:53 ` John Baldwin
2023-10-27 11:11 ` George, Jini Susan
2023-10-31 16:41 ` John Baldwin
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=21a013ea-83d3-49d3-80c6-ca8477e3d60b@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=George@smtp.polymtl.ca \
--cc=JiniSusan.George@amd.com \
--cc=Willgerodt@smtp.polymtl.ca \
--cc=felix.willgerodt@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=jhb@FreeBSD.org \
/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).