From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19051 invoked by alias); 2 Oct 2008 14:16:23 -0000 Received: (qmail 19040 invoked by uid 22791); 2 Oct 2008 14:16:21 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.184) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 02 Oct 2008 14:15:35 +0000 Received: by nf-out-0910.google.com with SMTP id h3so480702nfh.48 for ; Thu, 02 Oct 2008 07:15:32 -0700 (PDT) Received: by 10.210.67.20 with SMTP id p20mr6185133eba.174.1222956932049; Thu, 02 Oct 2008 07:15:32 -0700 (PDT) Received: by 10.210.63.19 with HTTP; Thu, 2 Oct 2008 07:15:31 -0700 (PDT) Message-ID: <6dc9ffc80810020715o21079a0fn972cd30a94695f6c@mail.gmail.com> Date: Thu, 02 Oct 2008 14:16:00 -0000 From: "H.J. Lu" To: "Mark Kettenis" Subject: Re: PATCH: Extend gdb remote protocol for AVX Cc: gdb-patches@sourceware.org, dan@codesourcery.com In-Reply-To: <200810021026.m92AQMqC006955@brahms.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080918172728.GA12703@lucon.org> <200810021026.m92AQMqC006955@brahms.sibelius.xs4all.nl> 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: 2008-10/txt/msg00052.txt.bz2 On Thu, Oct 2, 2008 at 3:26 AM, Mark Kettenis wrote: >> Date: Thu, 18 Sep 2008 10:27:28 -0700 >> From: "H.J. Lu" >> >> Hi, >> >> Intel AVX extends 128bit XMM registers to 256bit YMM registers. I >> am enclosing a propose to add YMM register support in gdb. Since >> there is no AVX hardware, we can only implement the remote debug >> with AVX emulator. >> >> This patch extends gdb remote protocol for AVX, based on Daniel's >> patch to auto-detect ia32 and x86-64 executables: >> >> http://sources.redhat.com/ml/gdb-patches/2006-11/msg00056.html >> >> I tested it by setting x86_sse_unit to avx in gdbserver/i387-fp.c. OK >> to install? > > Had some time to learn about AVX yesterday. I noticed that the %ymm > registers partially overlap with the %xmm registers, and that while xmm register is the alias of the lower 128bit of ymm register. > Intel obviously is trying to deprecate the old SSE stuff, the > instructions will still be present. As such, I think the goal: > >> 1. Only display YMM registers, no XMM registers if the execution >> environment supports AVX, independent of executables. > > is wrong. People should still be able to debug traditional SSE code > even if the execution environment supports AVX. Since the following > goals follow from #1: You can still debug SSE code with my proposal. >> 2. Native: >> a. Check native AVX support at run-time. >> b. Use AVX registers only if native environment supports AVX. >> Otherwise use XMM registers. >> 3. Remote: >> a. Check remote AVX support when setting up connection. >> b. Use AVX registers only if remote environment supports AVX. >> Otherwise use XMM registers. > > I disagree with those as well. > > We probably need to play pseudo-register tricks to make sure %xmm and > %ymm share the data for the lower 128 bits in the register cache, and > perhaps some option to choose between showing %xmm, %ymm or both in > the "info registers" output. > The relationship between xmm and ymm is similar to eax and rax. My proposal only deals with how to access xmm/ymm registers and doesn't affect other aspects. What does your suggestion will buy us beyond my proposal? -- H.J.