From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id E3F073858D28 for ; Tue, 11 Apr 2023 01:49:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E3F073858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.11] (unknown [167.248.160.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 81F2D1E0D2; Mon, 10 Apr 2023 21:49:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1681177793; bh=ZO7JskKuPtw4iUxlHc37+WOpwbQ0PLOTl9he90+Vwbw=; h=Date:Subject:To:References:From:In-Reply-To:From; b=WVeoiXBKBN0AIKHtc88LbmdXg99sory87OhExE8mxvaAi+gYbenEyMhykU7+hKdx7 JlKzUsvpUJlpmPDiHhAHusiLuCPDUwtcKnrQ347o4aw3GwHZasCrUZurybzJn2hgL5 yrMvob03VcBEliqlSRzQIdwEG1YYQtXJvik+3jt8= Message-ID: <68fe0380-14d0-d0e6-51ef-bd39165e0071@simark.ca> Date: Mon, 10 Apr 2023 21:49:53 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v4 03/13] nat/x86-cpuid.h: Add x86_cpuid_count wrapper around __get_cpuid_count. Content-Language: en-US To: John Baldwin , gdb-patches@sourceware.org References: <20230318010905.14294-1-jhb@FreeBSD.org> <20230318010905.14294-4-jhb@FreeBSD.org> From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>> + >>> + return __get_cpuid_count (__level, __sublevel, __eax, __ebx, __ecx, __edx); >>> +} >>> + >>> #else >>> static __inline int >>> @@ -58,6 +77,14 @@ x86_cpuid (unsigned int __level, >>> 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 */ >> >> I'm surprised that we provide fallbacks for these functions when !i386 >> and !x86_64. I would think that this file should only be included when >> compiling on i386/x86_64. > > I'm also surprised, and a quick grep looks like it should be safe to drop > these to me, but perhaps as a separate followup? I'd be happy to see a cleanup for that, I love deleting useless code! Simon