From: Richard Henderson <rth@twiddle.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 6/6] target-alpha: Add high-resolution access to wall clock and an alarm.
Date: Fri, 26 Aug 2011 10:03:35 -1000 [thread overview]
Message-ID: <4E57FC17.1080405@twiddle.net> (raw)
In-Reply-To: <CAFEAcA8XgcmK+Gn1ra6W2UiAeZqF5SV3Kc90z=yC3PuV83yrZg@mail.gmail.com>
On 08/26/2011 06:36 AM, Peter Maydell wrote:
> Look at the way target-i386 and target-mips use gen_io_start()
> and gen_io_end() around x86 io insns and MIPS mtc0. I think
> that what you need is (a) to bracket with gen_io_start/end
> and (b) to end the translation block, but that's really just
> guesswork from the existing code...
I'll be applying this on top of 6/6. Look sane?
r~
---
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 37f2f20..8f0dc3e 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -1609,7 +1609,17 @@ static void gen_mfpr(int ra, int regno)
if (regno == 250) {
/* WALL_TIME */
- gen_helper_get_time(cpu_ir[ra]);
+ if (use_iocount) {
+ /* Mark as an IO operation because we read the time. */
+ gen_io_start();
+ gen_helper_get_time(cpu_ir[ra]);
+ gen_io_end();
+ /* Other targets break the TB to be able to take timer
+ interrupts immediately. This doesn't apply to Alpha
+ because we never take interrupts in PALmode. */
+ } else {
+ gen_helper_get_time(cpu_ir[ra]);
+ }
return;
}
@@ -1661,7 +1671,14 @@ static ExitStatus gen_mtpr(DisasContext *ctx, int rb, int regno)
case 251:
/* ALARM */
- gen_helper_set_alarm(tmp);
+ if (use_icount) {
+ /* Mark as an IO operation because we reference the time. */
+ gen_io_start();
+ gen_helper_set_alarm(tmp);
+ gen_io_end();
+ } else {
+ gen_helper_set_alarm(tmp);
+ }
break;
default:
next prev parent reply other threads:[~2011-08-26 20:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-25 21:45 [Qemu-devel] [PULL][PATCH 0/6] Alpha system emulation, v9 Richard Henderson
2011-08-25 21:45 ` [Qemu-devel] [PATCH 1/6] target-alpha: Add custom PALcode image for CLIPPER emulation Richard Henderson
2011-08-26 4:09 ` Peter Maydell
2011-08-25 21:45 ` [Qemu-devel] [PATCH 2/6] target-alpha: Add " Richard Henderson
2011-08-25 21:45 ` [Qemu-devel] [PATCH 3/6] " Richard Henderson
2011-08-25 21:45 ` [Qemu-devel] [PATCH 4/6] target-alpha: Implement WAIT IPR Richard Henderson
2011-08-25 21:45 ` [Qemu-devel] [PATCH 5/6] target-alpha: Implement HALT IPR Richard Henderson
2011-08-25 21:45 ` [Qemu-devel] [PATCH 6/6] target-alpha: Add high-resolution access to wall clock and an alarm Richard Henderson
2011-08-26 3:51 ` Peter Maydell
2011-08-26 9:07 ` Paolo Bonzini
2011-08-26 16:28 ` Richard Henderson
2011-08-26 16:36 ` Peter Maydell
2011-08-26 20:03 ` Richard Henderson [this message]
2011-08-26 20:12 ` Richard Henderson
2011-08-27 16:44 ` Edgar E. Iglesias
2011-08-25 21:59 ` [Qemu-devel] [PULL][PATCH 0/6] Alpha system emulation, v9 Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2011-09-22 15:30 [Qemu-devel] [PATCH 0/6] Alpha system emulation, v11 Richard Henderson
2011-09-22 15:30 ` [Qemu-devel] [PATCH 6/6] target-alpha: Add high-resolution access to wall clock and an alarm Richard Henderson
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=4E57FC17.1080405@twiddle.net \
--to=rth@twiddle.net \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).