Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Randolph Chung <tausq@debian.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/resend/rfa] (3/4) Remove DEPRECATED_CLEAN_UP_REGISTER_VALUE
Date: Thu, 15 Apr 2004 15:34:00 -0000	[thread overview]
Message-ID: <407EAB89.1040506@gnu.org> (raw)
In-Reply-To: <20040414062447.GL31873@tausq.org>


> +static void
> +hppa_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
> +			   int regnum, void *buf)
> +{
> +    regcache_raw_read (regcache, regnum, buf);
> +    if (regnum == PCOQ_HEAD_REGNUM || regnum == PCOQ_TAIL_REGNUM)
> +      ((char *)buf)[sizeof(CORE_ADDR) -1 ] &= ~0x3;
> +}
> +

Almost, this needs to be portable across byte-orders which means using 
something like:
	[U]LONGEST tmp;
	regcache_raw_read_[un]signed (&tmp)
	mask tmp
	store_[un]signed_integer buf, tmp
with that tweak it is ok to commit (for reference, post the final patch)

andrew
(this also lets me clean-up more of the register code, ya!)



  reply	other threads:[~2004-04-15 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-14  6:24 Randolph Chung
2004-04-15 15:34 ` Andrew Cagney [this message]
2004-04-17 17:32   ` Randolph Chung

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=407EAB89.1040506@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=tausq@debian.org \
    /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