From: Aurelien Jarno <aurelien@aurel32.net>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 13/13] target-alpha: Implement RPCC.
Date: Sat, 10 Apr 2010 03:09:09 +0200 [thread overview]
Message-ID: <20100410010909.GA21042@volta.aurel32.net> (raw)
In-Reply-To: <71f0403498e3107af0d749484b2710d1cefd1ace.1270680209.git.rth@twiddle.net>
On Wed, Apr 07, 2010 at 03:42:54PM -0700, Richard Henderson wrote:
> A minimal implementation that more or less corresponds to the
> user-level version used by target-i386. More hoops will want
> to be jumped through when alpha gets system-level emulation.
This patch looks ok, but it mixed host and target changes. Can you
please split it?
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
> qemu-timer.h | 13 +++++++++++++
> target-alpha/cpu.h | 1 -
> target-alpha/op_helper.c | 5 +++--
> 3 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/qemu-timer.h b/qemu-timer.h
> index d2e15f4..6e2d2e1 100644
> --- a/qemu-timer.h
> +++ b/qemu-timer.h
> @@ -209,6 +209,19 @@ static inline int64_t cpu_get_real_ticks(void)
> return (int64_t)(count * cyc_per_count);
> }
>
> +#elif defined(__alpha__)
> +
> +static inline int64_t cpu_get_real_ticks(void)
> +{
> + uint64_t cc;
> + uint32_t cur, ofs;
> +
> + asm volatile("rpcc %0" : "=r"(cc));
> + cur = cc;
> + ofs = cc >> 32;
> + return cur - ofs;
> +}
> +
> #else
> /* The host CPU doesn't have an easily accessible cycle counter.
> Just return a monotonically increasing value. This will be
> diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h
> index dae23e2..c2f6a50 100644
> --- a/target-alpha/cpu.h
> +++ b/target-alpha/cpu.h
> @@ -355,7 +355,6 @@ struct CPUAlphaState {
> uint64_t ir[31];
> float64 fir[31];
> uint64_t pc;
> - uint32_t pcc[2];
> uint64_t ipr[IPR_LAST];
> uint64_t ps;
> uint64_t unique;
> diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c
> index bfc095c..ff5ae26 100644
> --- a/target-alpha/op_helper.c
> +++ b/target-alpha/op_helper.c
> @@ -21,6 +21,7 @@
> #include "host-utils.h"
> #include "softfloat.h"
> #include "helper.h"
> +#include "qemu-timer.h"
>
> /*****************************************************************************/
> /* Exceptions processing helpers */
> @@ -33,8 +34,8 @@ void QEMU_NORETURN helper_excp (int excp, int error)
>
> uint64_t helper_load_pcc (void)
> {
> - /* XXX: TODO */
> - return 0;
> + /* ??? This isn't a timer for which we have any rate info. */
> + return (uint32_t)cpu_get_real_ticks();
> }
>
> uint64_t helper_load_fpcr (void)
> --
> 1.6.6.1
>
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2010-04-10 1:12 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-07 22:43 [Qemu-devel] [PATCH 00/13] target-alpha improvements, version 4 Richard Henderson
2010-03-25 0:13 ` [Qemu-devel] [PATCH 10/13] target-alpha: Enable NPTL Richard Henderson
2010-04-10 0:54 ` Aurelien Jarno
2010-03-29 17:48 ` [Qemu-devel] [PATCH 09/13] target-alpha: Update commentary for opcode 0x1A Richard Henderson
2010-04-07 17:17 ` [Qemu-devel] [PATCH 05/13] target-alpha: Implement cvtlq inline Richard Henderson
2010-04-07 20:32 ` [Qemu-devel] [PATCH 11/13] target-alpha: Indicate NORETURN status when raising exception Richard Henderson
2010-04-07 22:42 ` [Qemu-devel] [PATCH 12/13] target-alpha: Fix load-locked/store-conditional Richard Henderson
2010-04-07 22:42 ` [Qemu-devel] [PATCH 13/13] target-alpha: Implement RPCC Richard Henderson
2010-04-10 1:09 ` Aurelien Jarno [this message]
2010-04-07 22:49 ` [Qemu-devel] [PATCH 04/13] target-alpha: Implement cvtql inline Richard Henderson
2010-04-07 22:49 ` [Qemu-devel] [PATCH 02/13] target-alpha: Implement cpys{, n, e} inline Richard Henderson
2010-04-10 0:39 ` Aurelien Jarno
2010-04-07 22:49 ` [Qemu-devel] [PATCH 06/13] target-alpha: Use setcond for int comparisons Richard Henderson
2010-04-10 1:05 ` Aurelien Jarno
2010-04-07 22:49 ` [Qemu-devel] [PATCH 01/13] target-alpha: Add flags markups to helpers.h Richard Henderson
2010-04-10 1:05 ` Aurelien Jarno
2010-04-07 22:49 ` [Qemu-devel] [PATCH 07/13] target-alpha: Use non-inverted arguments to gen_{f}cmov Richard Henderson
2010-04-10 1:05 ` Aurelien Jarno
2010-04-07 22:49 ` [Qemu-devel] [PATCH 03/13] target-alpha: Implement rs/rc properly Richard Henderson
2010-04-10 0:44 ` Aurelien Jarno
2010-04-07 22:49 ` [Qemu-devel] [PATCH 08/13] target-alpha: Emit goto_tb opcodes Richard Henderson
2010-04-12 23:23 ` [Qemu-devel] [PATCH 00/10] target-alpha improvments, version 5 Richard Henderson
2010-03-29 17:48 ` [Qemu-devel] [PATCH 05/10] target-alpha: Update commentary for opcode 0x1A Richard Henderson
2010-04-07 17:17 ` [Qemu-devel] [PATCH 03/10] target-alpha: Implement cvtlq inline Richard Henderson
2010-04-07 20:32 ` [Qemu-devel] [PATCH 07/10] target-alpha: Indicate NORETURN status when raising exception Richard Henderson
2010-04-07 22:42 ` [Qemu-devel] [PATCH 08/10] target-alpha: Fix load-locked/store-conditional Richard Henderson
2010-04-12 23:12 ` [Qemu-devel] [PATCH 01/10] target-alpha: Implement cpys{, n, e} inline Richard Henderson
2010-04-12 23:14 ` [Qemu-devel] [PATCH 02/10] target-alpha: Implement rs/rc properly Richard Henderson
2010-04-12 23:17 ` [Qemu-devel] [PATCH 06/10] target-alpha: Enable NPTL Richard Henderson
2010-04-12 23:18 ` [Qemu-devel] [PATCH 09/10] target-alpha: Implement RPCC Richard Henderson
2010-04-12 23:19 ` [Qemu-devel] [PATCH 10/10] Implement cpu_get_real_ticks for Alpha Richard Henderson
2010-04-12 23:26 ` [Qemu-devel] [PATCH 04/10] target-alpha: Emit goto_tb opcodes 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=20100410010909.GA21042@volta.aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).