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 800DB3858D38 for ; Mon, 28 Aug 2023 16:50:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 800DB3858D38 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 37SGoMjM023316 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Aug 2023 12:50:27 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 37SGoMjM023316 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1693241428; bh=Lh0DJ46bGLZ9aWRBAae9pBVbRYLK6SH9oSiFSGTClcQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=E4Ss+WS5+KGCwc1U7N7BXflg+crpkPcIMo6B0mih2h+Sdo6BUKPH9sjBoAepNxQHw iAkohDna6pftnQOOId6pJ1gUiVuqGuV1tpccJbgTWLqyMPIL+g/U39KXdO87wzS7Bo wu0snL++/DcypcUp4zaNWBTg8MpmxeyAgjkJ5KCQ= 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 BF8A21E092; Mon, 28 Aug 2023 12:50:22 -0400 (EDT) Message-ID: <00691d7c-e771-4469-a0be-681c7c30a4e1@polymtl.ca> Date: Mon, 28 Aug 2023 12:50:22 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 12/15] gdbserver: Refactor the legacy region within the xsave struct Content-Language: fr To: John Baldwin , gdb-patches@sourceware.org Cc: Aleksandar Paunovic References: <20230714155151.21723-1-jhb@FreeBSD.org> <20230714155151.21723-13-jhb@FreeBSD.org> From: Simon Marchi In-Reply-To: <20230714155151.21723-13-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:50:23 +0000 X-Spam-Status: No, score=-3037.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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: > From: Aleksandar Paunovic > > Legacy fields of the XSAVE area are already defined within fx_save > struct. Use class inheritance to remove code duplication. > > The two changed functions are called within all tests which run > gdbserver. > > Signed-off-by: Aleksandar Paunovic > Co-authored-by: John Baldwin > --- > gdbserver/i387-fp.cc | 27 ++------------------------- > 1 file changed, 2 insertions(+), 25 deletions(-) > > diff --git a/gdbserver/i387-fp.cc b/gdbserver/i387-fp.cc > index b8d7a912f26..a122e2d860b 100644 > --- a/gdbserver/i387-fp.cc > +++ b/gdbserver/i387-fp.cc > @@ -81,29 +81,7 @@ struct i387_fxsave { > unsigned char xmm_space[256]; > }; > > -struct i387_xsave { > - /* All these are only sixteen bits, plus padding, except for fop (which > - is only eleven bits), and fooff / fioff (which are 32 bits each). */ > - unsigned short fctrl; > - unsigned short fstat; > - unsigned short ftag; > - unsigned short fop; > - unsigned int fioff; > - unsigned short fiseg; > - unsigned short pad1; > - unsigned int fooff; > - unsigned short foseg; > - unsigned short pad12; > - > - unsigned int mxcsr; > - unsigned int mxcsr_mask; > - > - /* Space for eight 80-bit FP values in 128-bit spaces. */ > - unsigned char st_space[128]; > - > - /* Space for eight 128-bit XMM values, or 16 on x86-64. */ > - unsigned char xmm_space[256]; > - > +struct i387_xsave : public i387_fxsave { The { should go on the next line... can you fix all the structs in this file with an obvious patch on top of the series? Otherwise: Approved-By: Simon Marchi Simon