Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@cygnus.com>
To: gdb-patches@sources.redhat.com
Cc: cagney@redhat.com, jimb@redhat.com
Subject: [RFA] Update D10V target to use new Harvardized type casts.
Date: Mon, 05 Nov 2001 12:15:00 -0000	[thread overview]
Message-ID: <200111142057.fAEKvKB12616@reddwarf.cygnus.com> (raw)


This one-line change lets the D10V back-end recognize the new
Harvardized type casts eg. "(@code int *)", so that a pointer 
can be forced into the address space of choice.

The exact same change can be used for (most) other Harvard back-ends.

2001-11-14  Michael Snyder  <msnyder@redhat.com>

	* d10v-tdep.c (d10v_pointer_to_address): Use new type flag
	TYPE_FLAG_CODE_SPACE to recognize a pointer that has been cast
	into the instruction address space.

Index: d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.25
diff -p -r1.25 d10v-tdep.c
*** d10v-tdep.c	2001/10/15 18:18:29	1.25
--- d10v-tdep.c	2001/11/14 20:56:37
*************** d10v_pointer_to_address (struct type *ty
*** 413,419 ****
  
    /* Is it a code address?  */
    if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC
!       || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD)
      return d10v_make_iaddr (addr);
    else
      return d10v_make_daddr (addr);
--- 413,420 ----
  
    /* Is it a code address?  */
    if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC
!       || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD ||
!       (TYPE_FLAGS (TYPE_TARGET_TYPE (type)) & TYPE_FLAG_CODE_SPACE) != 0)
      return d10v_make_iaddr (addr);
    else
      return d10v_make_daddr (addr);


             reply	other threads:[~2001-11-14 20:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-05 12:15 Michael Snyder [this message]
2001-11-05 14:48 ` Andrew Cagney
2001-11-05 15:37   ` Michael Snyder
2001-11-05 15:52     ` Andrew Cagney

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=200111142057.fAEKvKB12616@reddwarf.cygnus.com \
    --to=msnyder@cygnus.com \
    --cc=cagney@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@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