Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: Don't try to take address of SIMD vectors
@ 2004-08-10  7:29 Jim Blandy
  2005-03-26 22:38 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2004-08-10  7:29 UTC (permalink / raw)
  To: gdb-patches


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.

Index: gdb/eval.c
===================================================================
RCS file: /cvs/src/src/gdb/eval.c,v
retrieving revision 1.41
diff -c -p -r1.41 eval.c
*** gdb/eval.c	8 Apr 2004 21:18:12 -0000	1.41
--- gdb/eval.c	9 Aug 2004 23:01:19 -0000
*************** evaluate_subexp_with_coercion (struct ex
*** 2157,2162 ****
--- 2157,2163 ----
    int pc;
    struct value *val;
    struct symbol *var;
+   struct type *type;
  
    pc = (*pos);
    op = exp->elts[pc].opcode;
*************** evaluate_subexp_with_coercion (struct ex
*** 2165,2171 ****
      {
      case OP_VAR_VALUE:
        var = exp->elts[pc + 2].symbol;
!       if (TYPE_CODE (check_typedef (SYMBOL_TYPE (var))) == TYPE_CODE_ARRAY
  	  && CAST_IS_CONVERSION)
  	{
  	  (*pos) += 4;
--- 2166,2179 ----
      {
      case OP_VAR_VALUE:
        var = exp->elts[pc + 2].symbol;
!       type = check_typedef (SYMBOL_TYPE (var));
! 
!       /* If the variable's value is an array, produce a pointer to its
!          first element.  But if it's a SIMD vector, leave it alone ---
!          we can't do address arithmetic to find their elements, and
!          value_subscript handles them specially.  */
!       if (TYPE_CODE (type) == TYPE_CODE_ARRAY
!           && ! TYPE_VECTOR (type)
  	  && CAST_IS_CONVERSION)
  	{
  	  (*pos) += 4;


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-03-29 17:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-10  7:29 RFA: Don't try to take address of SIMD vectors Jim Blandy
2005-03-26 22:38 ` Daniel Jacobowitz
2005-03-29 17:37   ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox