From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>
Subject: Re: [PATCH] Don't attach to 'target_changed' observer in regcache
Date: Thu, 09 Aug 2012 08:37:00 -0000 [thread overview]
Message-ID: <1488047.W4eyA0a8U4@qiyao.dyndns.org> (raw)
In-Reply-To: <201208090811.q798Bbeq000405@glazunov.sibelius.xs4all.nl>
On Thursday, August 09, 2012 10:11:37 AM Mark Kettenis wrote:
> > Banked register doesn't matter here. "Changing one special register
> > changes the whole set of registers", which is exotic, matters. Are
> > they (banked registers) switched by modifying a certain register?
> > Per my few knowledge on SPARC and IA-64, the answer is "No".
>
> Banked registers are by defenition switched by modifying a certain
> register I'd say. And yes, for SPARC by changing %cwp will change the
> visible register window and therefore the contents of the %i0-7, %l0-7
> and %o0-7 registers. And changing some bits in the %pstate register
> will switch between sets of alternate global registers (%g0-7). It's
> been a while since I last looked at IA-64, but I'm pretty sure it has
> some similar mechanisms. Thinking about this a bit more, PA-RISC is
> another architecture that has such a mechanism. Some of its registers
> are shadowed and you can switch between the shadowed and non-shadowed
> by modifying a bit in the %psw register.
>
Mark,
thanks for your explanation. I must use the wrong key words in google, and
got less interesting search result than your answer here.
I am thinking that we may add a new gdbarch hook function 'register_changed
(int regnum)'. In default, it invalidates all regcaches, and backend can
override it to do something optimally. At least, we don't have to invalidate
all regcache on some ports, such as x86, tic6x.
> > The issues of this patch are 1) modifying read-only bits in writable
> > register (as Dan pointed out), 2) troubles to Orjan's port. I can't
> > see any other issues of this patch.
>
> And I'm telling you that the "troubles with Orjan's port" are more
> general than you think they are.
Agreed.
--
Yao (齐尧)
next prev parent reply other threads:[~2012-08-09 8:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-02 7:17 Yao Qi
2012-08-02 14:46 ` Pedro Alves
2012-08-02 15:40 ` Yao Qi
2012-08-08 17:54 ` Mark Kettenis
2012-08-09 3:11 ` Yao Qi
2012-08-09 8:12 ` Mark Kettenis
2012-08-09 8:37 ` Yao Qi [this message]
2012-08-21 19:39 ` Pedro Alves
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=1488047.W4eyA0a8U4@qiyao.dyndns.org \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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