From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5882 invoked by alias); 7 Apr 2010 15:04:28 -0000 Received: (qmail 5741 invoked by uid 22791); 7 Apr 2010 15:04:26 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45 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; Wed, 07 Apr 2010 15:04:19 +0000 Received: by vws14 with SMTP id 14so612058vws.0 for ; Wed, 07 Apr 2010 08:04:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.44.198 with HTTP; Wed, 7 Apr 2010 08:04:17 -0700 (PDT) In-Reply-To: References: <20100304180219.GA10826@intel.com> <20100304180643.GB10869@intel.com> <20100306222037.GD21133@intel.com> <20100312164930.GB6144@intel.com> <20100329011124.GA27275@intel.com> <20100402143107.GA24450@intel.com> <201004021441.o32EfT7s024414@glazunov.sibelius.xs4all.nl> <201004071013.o37ADH21025897@glazunov.sibelius.xs4all.nl> Date: Wed, 07 Apr 2010 15:04:00 -0000 Received: by 10.220.129.10 with SMTP id m10mr2076516vcs.43.1270652657592; Wed, 07 Apr 2010 08:04:17 -0700 (PDT) Message-ID: Subject: Re: PATCH: 3/6 [3rd 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-04/txt/msg00132.txt.bz2 On Wed, Apr 7, 2010 at 7:55 AM, H.J. Lu wrote: > On Wed, Apr 7, 2010 at 3:13 AM, Mark Kettenis w= rote: >>> >>> XSAVE is different from FXSAVE in some subtle ways, although >>> XSAVE memory layout is an extension to FXSAVE memory layout. >>> XSAVE has used or initialized states for SSE and AVX registers. >>> Most of the codes in i387_collect_xsave deal with used/initialized stat= es. >>> >>> Please identify the duplication of code in i387_collect_xsave. I will t= ake >>> a look. >> >> There is in if (gcore) { } else { } there, that has quite a bit of >> duplicated code. =A0I may be missing something, but the fact that >> i387_collect_xsave() does different things whether it is generating a >> core file or not seems to be undesirable and wrong to me. >> > > I will take a look. > That is xstate_bv optimization. xstate_bv controls how vector registers are restored via xsave. If we will eventually call xsave, we set up xstate_= bv such that xsave will do minimum work to properly restore vector registers. If it is for gcore, we don't need to optimize xstate_bv. Of course, we can always optimize xstate_bv even for gcore. I can do that if it is desired. Thanks. --=20 H.J.