Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: Don't try to take address of SIMD vectors
Date: Tue, 10 Aug 2004 07:29:00 -0000	[thread overview]
Message-ID: <vt2isbrqwrq.fsf@zenia.home> (raw)


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;


             reply	other threads:[~2004-08-10  7:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-10  7:29 Jim Blandy [this message]
2005-03-26 22:38 ` Daniel Jacobowitz
2005-03-29 17:37   ` Jim Blandy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vt2isbrqwrq.fsf@zenia.home \
    --to=jimb@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox