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 E29F4385842D for ; Wed, 3 May 2023 17:49:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E29F4385842D 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.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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1683136157; bh=Omm+3pbpH1JTe41+p8+VH7gQsk/NaXowROw37N9CJzI=; h=Date:Subject:To:References:From:In-Reply-To:From; b=orYdmMeUa7b50Hrh9zOg1U6DKj4noGOQbLteu5ouHOu09yY2dUdm7C6yuWlK4LWBl j6lhYYqSu13GXHbobNr0qfxG4mMdUWjl/HLj1O9i1imb/POx1VpphqwN4ZJKvbzOXP pEUBw8kh3k743b8SYV7IuyNULRa6fkwSwpQvQqWM= 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> From: Simon Marchi In-Reply-To: <20230427210113.45380-17-jhb@FreeBSD.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 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