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 B204E3858D28 for ; Fri, 7 Apr 2023 02:13:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B204E3858D28 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.111] (modemcable162.249-56-74.mc.videotron.ca [74.56.249.162]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 412FE1E0D3; Thu, 6 Apr 2023 22:13:21 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1680833601; bh=gflxvP4sHwQ7dkrulahlQeIDkZ/tWifaludNePn3H7g=; h=Date:Subject:To:References:From:In-Reply-To:From; b=G4yhnL5ftvhOQR9KJwqvwzLDy194hMEoGZ7a1OAMV35Kwrv21jH1N5a3AaxqQcOOv QLZuxJsq3siJWtcvJuFdhp/7LCB1pPXq4XoBOiNDH+fNKnCO5tWLK92PWrIS1hhWUf /Vs0LuRIDWtU2QFdnjbTYtemJxsTAWp4vKio6LoY= Message-ID: <374fa9a8-58e6-2bc7-68e1-51c85ed0851b@simark.ca> Date: Thu, 6 Apr 2023 22:13:20 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v4 09/13] gdb: Use x86_xstate_layout to parse the XSAVE extended state area. Content-Language: fr To: John Baldwin , gdb-patches@sourceware.org References: <20230318010905.14294-1-jhb@FreeBSD.org> <20230318010905.14294-10-jhb@FreeBSD.org> From: Simon Marchi In-Reply-To: <20230318010905.14294-10-jhb@FreeBSD.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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: I don't know the x86 register set by heart, so this patch is a bit cryptic for me. It's a of code that looks similar but not quite, it would be hard to spot a typo in there. I didn't spot any mistake, but that doesn't mean much. On 3/17/23 21:09, John Baldwin wrote: > All of the tables describing the offsets of indvidual registers for individual > -/* At xsave_avx512_zmm_h_offset[REGNUM] you find the offset to the location in > - the upper 256bit of AVX512 ZMMH register data structure used by the "xsave" > - instruction where GDB register REGNUM is stored. */ > > -static int xsave_avx512_zmm_h_offset[] = > +/* At xsave_avx512_zmm0_h_offset[REGNUM] you find the relative offset > + within the ZMM_H region of the XSAVE extended state where the upper > + 256bits of the GDB register ZMM0 + REGNUM is stored. */ > + > +/* At xsave_avx512_zmm16_h_offset[REGNUM] you find the relative offset > + within the ZMM_H region of the XSAVE extended state where the upper > + 256bits of the GDB register ZMM16 + REGNUM is stored. */ I think this second comment is misplaced, and should be just above xsave_avx512_zmm16_h_offset? Simon