This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Don't try to take address of SIMD vectors


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]