This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: Don't try to take address of SIMD vectors
- From: Jim Blandy <jimb at redhat dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: 29 Mar 2005 12:36:08 -0500
- Subject: Re: RFA: Don't try to take address of SIMD vectors
- References: <vt2isbrqwrq.fsf@zenia.home><20050326223856.GA1151@nevyn.them.org>
Daniel Jacobowitz <drow@false.org> 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 <jimb@redhat.com>
> >
> > * 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.