From: Richard Earnshaw <rearnsha@arm.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: Richard.Earnshaw@arm.com, gdb-patches@sources.redhat.com
Subject: Re: [wip/cagney_regbuf-20020515-branch] Introduce regcache_move()
Date: Sun, 19 May 2002 07:47:00 -0000 [thread overview]
Message-ID: <200205191447.PAA25151@cam-mail2.cambridge.arm.com> (raw)
In-Reply-To: Your message of "Sat, 18 May 2002 15:08:38 EDT." <3CE6A6B6.2030007@cygnus.com>
> There is a ``work around'' for this immediate problem.
>
> I'm going to add a register_bytes() method to regcache that makes the [0
> .. NUM_REGS + NUM_PSEUDO_REGS) contigious and returns an offset based on
> that assumption.
>
> write_register_bytes(), with the suggested change, will convert the
> offset back to a regnum and call write_register_gen() with that.
Hmm, so each pseudo would allocate a unique address even though there was
no real regbuf space for it; something like
0 4 4*(n-1) 4*n 4*(n+1) ...
+---------+---------+ +---------+---------+---------+
| Phys r0 | Phys r1 | ... | Phys rn | Pseu r0 | Pseu r1 |
+---------+---------+ +---------+---------+---------+
| REGBUF ... |
+-------------------- ----------+
Then each reg would have a unique address. Provided we always call
through the correct interfaces, and never use
memcpy (grub_around...registers() + REGISTER_BYTE(PseudoN), ...)
then this would work.
> Rock warning: GDB uses the above to handle (with limited success) values
> that cross two registers. For instance a long long in two adjacent long
> registers. See value_from_register().
I've been told ARM's own C compiler can put long longs in non-adjacent
register pairs. At some point I will need to support that... it will
probably mean being able to read from some ordered list of registers, or
some such.
R.
next prev parent reply other threads:[~2002-05-19 14:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-17 9:36 Andrew Cagney
2002-05-18 4:18 ` Richard Earnshaw
2002-05-18 4:38 ` Richard Earnshaw
2002-05-18 11:27 ` Andrew Cagney
2002-05-18 12:08 ` Andrew Cagney
2002-05-19 7:47 ` Richard Earnshaw [this message]
2002-05-19 8:10 ` 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=200205191447.PAA25151@cam-mail2.cambridge.arm.com \
--to=rearnsha@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=ac131313@cygnus.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