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 E1FD13858D28 for ; Tue, 11 Apr 2023 01:51:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E1FD13858D28 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 92BF31E0D2; Mon, 10 Apr 2023 21:51:09 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1681177869; bh=9W/Vz5eaOlhJb0HmzmHe6zGyGVv8MP005W5o0MWvNTg=; h=Date:Subject:To:References:From:In-Reply-To:From; b=uKi2HH7snrMOVgvsqjh0MyTxEia62gb0hKFt5vkuzpPh++nY3TGngq14upJZadOT8 f2PbRfFnooe1Nr05KC74QZoHzEbjmZW6bPuCh011S4hoBtqXBrLG0xMevlJ2yOiCqJ Q8902K1MFP+gNro9c1FOjr2uJxIr9VIsUu49o5Xc= Message-ID: <2a4ba3a4-2705-44b8-8d20-ed1f508fc4be@simark.ca> Date: Mon, 10 Apr 2023 21:51:09 -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 04/13] x86 nat: Add helper functions to save the XSAVE layout for the host. Content-Language: en-US To: John Baldwin , gdb-patches@sourceware.org References: <20230318010905.14294-1-jhb@FreeBSD.org> <20230318010905.14294-5-jhb@FreeBSD.org> <68edcaf2-367c-231c-d3b9-4a5ddbc9463f@simark.ca> <0b60c557-ac1e-28ef-4bd6-06064232371e@FreeBSD.org> From: Simon Marchi In-Reply-To: <0b60c557-ac1e-28ef-4bd6-06064232371e@FreeBSD.org> 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: >> Does x86_cpuid_count return a count, as the name suggests (and not a >> boolean)? If so, it should be == 0. Otherwise, ignore that. > > No, it returns a bool like x86_cpuid. Some CPUID leaves on x86 take a > sub-leaf where the main leaf is specified in EAX and the sub-leaf in ECX > when CPUID is invoked. The first CPUID leaves that used this documented > the ECX input as a count (I think the first ones were used for enumerating > cache topology info where ECX was basically an index). As a result, the > APIs for CPUID builtins in GCC, etc. all use the suffix "_count" for the > variants that take the ECX sub-leaf as an input. Ah, thanks! Simon