From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1693241183; bh=/0xl5sN6I4aS1VdvDL6SfI3NusvUIqnJ0V3hMLSQPcc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=qfda7K1f+ZVzliZuedt8rK9aMZD+vhhSG3Ld3+Xwtmc23gfBO7stUNSHTehZKAflM 3Kt/si18U4u9FJsbpkSB4FQ8wjKADAMtWVyky8I3bdwREQF2Npfpmd5PkSnffNk5SH JT2ddvKKB4LXBEQ+pNRHcosbZuJF2pPQZe/FaKNI= 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> From: Simon Marchi 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 List-Id: 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