From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id JPjOCLKeUmQ21T0AWB0awg (envelope-from ) for ; Wed, 03 May 2023 13:49:38 -0400 Received: by simark.ca (Postfix, from userid 112) id 1321C1E11B; Wed, 3 May 2023 13:49:38 -0400 (EDT) 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=T6wg3zOL; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 938441E0D6 for ; Wed, 3 May 2023 13:49:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1F9583858409 for ; Wed, 3 May 2023 17:49:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F9583858409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1683136177; bh=zRh4RuqvG8HXjRuFffAfq75sb8iEpXKJUYBnFdvKPac=; 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=T6wg3zOLrTIhNxTMSg/7ASuw5utoW40gYq/nOklRKScgcqC9XAjs5BCO9wsJ/I+P7 fm08kC2P0O3YuVY4LOpyOPPPM82FaOW4WtD/5q/Xhf1wG/5HbKu1G5jmj7DFo+bHHE IPI0OwWmSYZSPeeaXnkzqpXe2fLgdg57vAXcmtrY= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id E29F4385842D for ; Wed, 3 May 2023 17:49:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E29F4385842D Received: from [10.0.0.170] (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) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 7B4231E0D6; Wed, 3 May 2023 13:49:17 -0400 (EDT) Message-ID: Date: Wed, 3 May 2023 13:49:17 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v5 16/19] gdbserver: Clear upper ZMM registers in the right location. Content-Language: fr To: John Baldwin , gdb-patches@sourceware.org References: <20230427210113.45380-1-jhb@FreeBSD.org> <20230427210113.45380-17-jhb@FreeBSD.org> In-Reply-To: <20230427210113.45380-17-jhb@FreeBSD.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 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 4/27/23 17:01, John Baldwin wrote: > This was previously clearing the upper 32 bytes of ZMM0-15 rather than > ZMM16-31. > --- > gdbserver/i387-fp.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdbserver/i387-fp.cc b/gdbserver/i387-fp.cc > index e63eef60330..a122e2d860b 100644 > --- a/gdbserver/i387-fp.cc > +++ b/gdbserver/i387-fp.cc > @@ -306,7 +306,7 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf) > if ((clear_bv & X86_XSTATE_ZMM)) > { > for (i = 0; i < num_avx512_zmmh_high_registers; i++) > - memset (((char *) &fp->zmmh_low_space[0]) + 32 + i * 64, 0, 32); > + memset (((char *) &fp->zmmh_high_space[0]) + 32 + i * 64, 0, 32); >From what I understand, this is correct, so: Approved-By: Simon Marchi Unrelated to your patch, but I believe that zmmh_high_space should be called zmm_high_space, since it doesn't contain only upper values like zmmh_low_space does, it contains the full values for ZMM 16 through 31. Simon