From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id rW1TLHfP7GThuQwAWB0awg (envelope-from ) for ; Mon, 28 Aug 2023 12:46:47 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=PHBwy1fp; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A76D01E0C2; Mon, 28 Aug 2023 12:46:47 -0400 (EDT) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9916C1E092 for ; Mon, 28 Aug 2023 12:46:45 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4891C3858417 for ; Mon, 28 Aug 2023 16:46:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4891C3858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693241205; bh=/0xl5sN6I4aS1VdvDL6SfI3NusvUIqnJ0V3hMLSQPcc=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=PHBwy1fpxl4qeoBT67KHT0NH3nKpEKkFMJgNyhkOHT4fvAXZiZ555PF9aQN+RTqe7 V4KSHkaaPCbuAALtDl2oDLtmJtXWNPTf22nSAlGwYdgt8HUIzuLGtSCVv5GnEtVdCZ F7fM8nOV7eVM8VwqeLRkmUxs83XpbeRVdSNxNM5M= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id E501C3858D38 for ; Mon, 28 Aug 2023 16:46:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E501C3858D38 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 37SGkIkr020433 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Aug 2023 12:46:22 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 37SGkIkr020433 Received: from [10.0.0.170] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id EDCF31E092; Mon, 28 Aug 2023 12:46:17 -0400 (EDT) Message-ID: <187472bd-a992-4e00-bebe-134550e95497@polymtl.ca> Date: Mon, 28 Aug 2023 12:46:17 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 11/15] gdbserver: Add a function to set the XSAVE mask and size. Content-Language: fr To: John Baldwin , gdb-patches@sourceware.org References: <20230714155151.21723-1-jhb@FreeBSD.org> <20230714155151.21723-12-jhb@FreeBSD.org> In-Reply-To: <20230714155151.21723-12-jhb@FreeBSD.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 28 Aug 2023 16:46:18 +0000 X-Spam-Status: No, score=-3031.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 7/14/23 11:51, John Baldwin wrote: > Make x86_xcr0 private to i387-fp.cc and use i387_set_xsave_mask to set > the value instead. Add a static global instance of x86_xsave_layout > and initialize it in the new function as well to be used in a future > commit to parse XSAVE extended state regions. > > Update the Linux port to use this function rather than setting > x86_xcr0 directly. In the case that XML is not supported, don't > bother setting x86_xcr0 to the default value but just omit the call to > i387_set_xsave_mask as i387-fp.cc defaults to the SSE case used for > non-XML. > > In addition, use x86_xsave_length to determine the size of the XSAVE > register set via CPUID. Approved-By: Simon Marchi Simon