From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24959 invoked by alias); 7 Apr 2010 10:13:36 -0000 Received: (qmail 24948 invoked by uid 22791); 7 Apr 2010 10:13:34 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Apr 2010 10:13:27 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id o37ADJfZ003421; Wed, 7 Apr 2010 12:13:19 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id o37ADH21025897; Wed, 7 Apr 2010 12:13:17 +0200 (CEST) Date: Wed, 07 Apr 2010 10:13:00 -0000 Message-Id: <201004071013.o37ADH21025897@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: hjl.tools@gmail.com CC: gdb-patches@sourceware.org In-reply-to: (hjl.tools@gmail.com) Subject: Re: PATCH: 3/6 [3rd try]: Add AVX support (i386 changes) References: <20100304180219.GA10826@intel.com> <20100304180408.GA10869@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> 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/msg00124.txt.bz2 > Date: Fri, 2 Apr 2010 08:27:55 -0700 > From: "H.J. Lu" > > On Fri, Apr 2, 2010 at 7:41 AM, Mark Kettenis wrote: > >> Date: Fri, 2 Apr 2010 07:31:07 -0700 > >> From: "H.J. Lu" > >> > >> On Sun, Mar 28, 2010 at 06:11:24PM -0700, H.J. Lu wrote: > >> > Hi, > >> > > >> > Here are i386 changes to support AVX. OK to install? > >> > > >> > >> Here is the updated i386 changes to support AVX. OK to install? > > > > Sorry, but I'm still unhappy with the way you modify the > > i386_linux_regset_sections[] array at run time.  I think the best > > thing to do is to have gcore *always* create a NT_X86_XSTATE note of > > Generate NT_X86_XSTATE note without kernel/processor > NT_X86_XSTATE note support may require changes to > existing FXSAVE code path. I will investigate it. > > BTW, I have a follow up patch to implement 32bit core > registers without SSE registers to properly support older > processors, like Pentium and Pentium Pro. Should > "gcore" generate NT_PRXFPREG note? Probably. It'll surely make the code simpler. > > > the maximum size supported by GDB.  That way you can remove a lot of > > code (including the duplication of code in i387_collect_xsave). > > > > 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 states. > > Please identify the duplication of code in i387_collect_xsave. I will take > a look. There is in if (gcore) { } else { } there, that has quite a bit of duplicated code. I 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.