From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14634 invoked by alias); 29 Mar 2010 21:41:24 -0000 Received: (qmail 14626 invoked by uid 22791); 29 Mar 2010 21:41:23 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG40 X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Mar 2010 21:41:19 +0000 Received: by vws4 with SMTP id 4so560739vws.0 for ; Mon, 29 Mar 2010 14:41:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.90.201 with HTTP; Mon, 29 Mar 2010 14:41:17 -0700 (PDT) In-Reply-To: <201003292032.o2TKW2HW022909@glazunov.sibelius.xs4all.nl> References: <20100304180219.GA10826@intel.com> <20100304180408.GA10869@intel.com> <20100304180643.GB10869@intel.com> <20100306222037.GD21133@intel.com> <201003271547.o2RFlvNI002277@glazunov.sibelius.xs4all.nl> <6dc9ffc81003271837l761ac147t7ba88988cb99fcb0@mail.gmail.com> <201003281155.o2SBtYEk029587@glazunov.sibelius.xs4all.nl> <6dc9ffc81003280724o46b2fd80v6797a7ac765af333@mail.gmail.com> <201003292032.o2TKW2HW022909@glazunov.sibelius.xs4all.nl> Date: Mon, 29 Mar 2010 21:41:00 -0000 Received: by 10.220.129.71 with SMTP id n7mr3566915vcs.104.1269898877393; Mon, 29 Mar 2010 14:41:17 -0700 (PDT) Message-ID: <6dc9ffc81003291441i319c598bkc03fccdf050508fe@mail.gmail.com> Subject: Re: PATCH: 3/6 [2nd try]: Add AVX support (i386 changes) From: "H.J. Lu" To: Mark Kettenis Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-03/txt/msg01024.txt.bz2 On Mon, Mar 29, 2010 at 1:32 PM, Mark Kettenis wr= ote: >> Date: Sun, 28 Mar 2010 07:24:53 -0700 >> From: "H.J. Lu" >> >> > Anyway, how about setting the size of the .reg-xstate to >> > I386_XSTATE_SSE_SIZE unconditionally? =A0Tools will look at xcr0 value >> > encoded in there to determine what information in there is valid, so >> > dumping a little bit more than strictly necessary shouldn't be a >> > problem. >> >> That will make the code more complex since the generic gcore >> implementation will have to adjust section size based on XCR0. >> But if it is what is required, I will make the change. > > Sorry, I think you're missing my point here. =A0The idea is to make > gcore always write out a NT_XSTATE note that has the maximal size > (I386_XSTATE_MAX_SIZE, I now see I typed the wrong thing above). =A0Then > when you write out the section, you fill the bits that aren't used > with zeroes and make sure the value of xcr0 stored in there is set > correctly. > i386-linux-tdep.c has --- /* Update XSAVE extended state register note section. */ void i386_linux_update_xstateregset (unsigned int xstate_size) { struct core_regset_section *xstate =3D &i386_linux_regset_sections[3]; /* Update the XSAVE extended state register note section for "gcore". Disable it if its size is 0. */ gdb_assert (strcmp (xstate->sect_name, ".reg-xstate") =3D=3D 0); if (xstate_size) xstate->size =3D xstate_size; else xstate->sect_name =3D NULL; } --- Even if I set xstate_size to I386_XSTATE_MAX_SIZE, I still need to call it to set sect_name to NULL when the XSAVE extended state isn't available. Please let me know if this is what you want. Thanks. --=20 H.J.