From: Tristan Gingold <gingold@adacore.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix typo in _cpu_ppc_load_decr
Date: Mon, 27 Apr 2009 10:55:47 +0200 [thread overview]
Message-ID: <1240822547-735-1-git-send-email-gingold@adacore.com> (raw)
Use parameter 'next' to fix the hdecr case.
Also pass 'next' by value instead of pointer (more easy to read and no
performance issue for an always_inline function).
Signed-off-by: Tristan Gingold <gingold@adacore.com>
---
hw/ppc.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/ppc.c b/hw/ppc.c
index e9f1724..c23a02d 100644
--- a/hw/ppc.c
+++ b/hw/ppc.c
@@ -551,13 +551,13 @@ static void cpu_ppc_tb_start (CPUState *env)
}
static always_inline uint32_t _cpu_ppc_load_decr (CPUState *env,
- uint64_t *next)
+ uint64_t next)
{
ppc_tb_t *tb_env = env->tb_env;
uint32_t decr;
int64_t diff;
- diff = tb_env->decr_next - qemu_get_clock(vm_clock);
+ diff = next - qemu_get_clock(vm_clock);
if (diff >= 0)
decr = muldiv64(diff, tb_env->decr_freq, ticks_per_sec);
else
@@ -571,14 +571,14 @@ uint32_t cpu_ppc_load_decr (CPUState *env)
{
ppc_tb_t *tb_env = env->tb_env;
- return _cpu_ppc_load_decr(env, &tb_env->decr_next);
+ return _cpu_ppc_load_decr(env, tb_env->decr_next);
}
uint32_t cpu_ppc_load_hdecr (CPUState *env)
{
ppc_tb_t *tb_env = env->tb_env;
- return _cpu_ppc_load_decr(env, &tb_env->hdecr_next);
+ return _cpu_ppc_load_decr(env, tb_env->hdecr_next);
}
uint64_t cpu_ppc_load_purr (CPUState *env)
--
1.6.2
next reply other threads:[~2009-04-27 8:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-27 8:55 Tristan Gingold [this message]
2009-07-12 21:33 ` [Qemu-devel] [PATCH] Fix typo in _cpu_ppc_load_decr Aurelien Jarno
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=1240822547-735-1-git-send-email-gingold@adacore.com \
--to=gingold@adacore.com \
--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).