From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13066 invoked by alias); 29 Mar 2005 17:37:18 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12994 invoked from network); 29 Mar 2005 17:37:09 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 29 Mar 2005 17:37:09 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j2THb9Uv030701 for ; Tue, 29 Mar 2005 12:37:09 -0500 Received: from zenia.home.redhat.com (sebastian-int.corp.redhat.com [172.16.52.221]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j2THb2O06401; Tue, 29 Mar 2005 12:37:03 -0500 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: Don't try to take address of SIMD vectors References: <20050326223856.GA1151@nevyn.them.org> From: Jim Blandy Date: Tue, 29 Mar 2005 17:37:00 -0000 In-Reply-To: <20050326223856.GA1151@nevyn.them.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-03/txt/msg00378.txt.bz2 Daniel Jacobowitz writes: > On Tue, Aug 10, 2004 at 02:26:17AM -0500, Jim Blandy wrote: > > > > This is, in some sense, a followup to: > > > > http://sources.redhat.com/ml/gdb-patches/2002-05/msg00027.html > > > > No regressions on i686-pc-linux-gnu or powerpc-unknown-linux-gnu; > > fixes vector subscripting on PowerPC E500 SIMD vectors. > > > > 2004-08-09 Jim Blandy > > > > * eval.c (evaluate_subexp_with_coercion): Don't try to produce a > > pointer to the value's first element if it's a SIMD vector value, > > not an ordinary array. > > Hi Jim, > > I see that this patch was never checked in. I can't convince myself > >From the above that it's necessary; if you still want it, could you > show some examples? Bonus points if they fit in the testsuite. If I have a variable v which is a SIMD vector type, and I write f (v) does the compiler treat v like an array, and pass its address to f, or does it treat it like a struct, and pass it by value? I don't have my E500 tools all set up at the moment, but I believe it passes it by value. The other thing, I believe, is that subscripting vectors located in registers relies on using value_subscripted_rvalue. If you try to coerce a value living in a register to a pointer, you get an error before you get there.