From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by sourceware.org (Postfix) with ESMTPS id 24BFB3858D38 for ; Mon, 10 Apr 2023 21:40:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 24BFB3858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4PwMpy75kzz47xT; Mon, 10 Apr 2023 21:40:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PwMpy6MtFz3Qlc; Mon, 10 Apr 2023 21:40:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681162858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=byV2npFZWXkxmLji+57FinyncXb8kfIBH+2Y5YCGjTA=; b=DmtXyAETbMkfZtVxvd1pJ4ZtIAu9nefjMMevY7YJ1YYXJZ2HrHQvpRNx56SBi1OUcrJAEq SSNuWNtMRcdcYz6N7J3dKd5Pe7sW511mtihtBWMHDI1/QmHfJ5CISkRC3+IUEpjLlGvP+I kz5ICm0dEG4xxIpT8WUFxsuUvWQtVFWMllh6G7v3sKJ7JF6eInNsaH1ANRmu5uSgae1usu SvNb+IOQ/8zMl4101LX5psysAdg7nrcWlfGhwOeUUK2ELe4Mi6a3FMDDsrjXdzoNLSuc4Y fsDG0NLBLMT7G324O2kX8dJISC3LzgYFB9QaCMa50geIc5OifTw9Cw6Ibcie5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681162858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=byV2npFZWXkxmLji+57FinyncXb8kfIBH+2Y5YCGjTA=; b=NLh4cnMk2deNQwAez9CHupV6vYhugj62LIflrq/Y5tthwPFTRVAJCHHZ1VQWFwTxHhwuxq zBPIHv+IbBg1C5FYOSv/JsTDN6BgLz9XH3waOZ13uP+JDscWcCkvcrMuROel17QUMHa13t XtR43/K6eM/EQMJnwxU5u5r/IFL7EkmXf8k+D/6HR5tA1OwWIs1SAIcOf1qUemLLKqvPzz lUFwc5rdwkdwHuVC6HCwCqCPi69zQ1AsrSbRB0gobHCO06UiBjUa+G23cJ1uoEcqwwh5Bm q+6JBoDadNnr38moPfLWinVjDqWcGQaPlOdkbw1RJ+PIrG+usvT1/pehCN3IIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681162858; a=rsa-sha256; cv=none; b=iLUtwYuzr+YOua/p+aihC+Oj9V+LO4JLjjF2m5Y4VW9IgZDXjDTksKV1Jgpc2iUwgppWhh 7vhOTpj9AUUDNcV6AbZljjX6w68Ai8pLGqYZL9535RTmbfgJBOzjc79xiqm02FW8HLLQgN Qanpazb96/s1pHMWuknGKX2z1168KocXGNtb13rjLrIaHv4cclp1Q+SfbcKkqTUpmrRdPR T02TcryJHIVntOPP3kQ6xsw6WmQ4orrxJb8Z+L//70WoZAm9hZe27sndKa93m/KbDiGNx7 uBzhjT3ktFnPvRARNBTuOZKAHJ3l2EUmgB3mCdlTHc2ddtIL2QrK17G2kNpBlQ== Received: from [IPV6:2601:648:8680:16b0:14bb:55bb:f654:b139] (unknown [IPv6:2601:648:8680:16b0:14bb:55bb:f654:b139]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PwMpy3H0PzfJw; Mon, 10 Apr 2023 21:40:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <0bb3608d-1a39-a1c9-4285-40c3a5f57123@FreeBSD.org> Date: Mon, 10 Apr 2023 14:40:57 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; 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: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20230318010905.14294-1-jhb@FreeBSD.org> <20230318010905.14294-10-jhb@FreeBSD.org> <374fa9a8-58e6-2bc7-68e1-51c85ed0851b@simark.ca> From: John Baldwin In-Reply-To: <374fa9a8-58e6-2bc7-68e1-51c85ed0851b@simark.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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 4/6/23 7:13 PM, Simon Marchi wrote: > 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. One thing I would like to do as a followup to see if it makes this code easier to understand is to convert it over to using regcache_map_entry arrays for each state component. It would mean fewer loops I believe. > On 3/17/23 21:09, John Baldwin wrote: >> All of the tables describing the offsets of indvidual registers for > > individual Fixed. >> -/* 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? Yes, fixed. -- John Baldwin